Add signedness warning flag and fix fallout

This commit is contained in:
Kristian Høgsberg
2012-03-30 11:52:39 -04:00
parent ed92f79655
commit 875ab9e735
15 changed files with 39 additions and 34 deletions
+6 -5
View File
@@ -168,7 +168,7 @@ dnd_redraw_handler(struct widget *widget, void *data)
struct rectangle allocation;
cairo_t *cr;
cairo_surface_t *surface;
int i;
unsigned int i;
surface = window_get_surface(dnd->window);
cr = cairo_create(surface);
@@ -206,7 +206,7 @@ keyboard_focus_handler(struct window *window,
static int
dnd_add_item(struct dnd *dnd, struct item *item)
{
int i;
unsigned int i;
for (i = 0; i < ARRAY_LENGTH(dnd->items); i++) {
if (dnd->items[i] == 0) {
@@ -222,7 +222,7 @@ dnd_get_item(struct dnd *dnd, int32_t x, int32_t y)
{
struct item *item;
struct rectangle allocation;
int i;
unsigned int i;
widget_get_allocation(dnd->widget, &allocation);
@@ -369,7 +369,7 @@ dnd_button_handler(struct widget *widget,
struct display *display;
struct wl_compositor *compositor;
struct wl_buffer *buffer;
int i;
unsigned int i;
widget_get_allocation(dnd->widget, &allocation);
input_get_position(input, &x, &y);
@@ -518,8 +518,9 @@ static struct dnd *
dnd_create(struct display *display)
{
struct dnd *dnd;
int i, x, y;
int x, y;
int32_t width, height;
unsigned int i;
dnd = malloc(sizeof *dnd);
if (dnd == NULL)
+1 -1
View File
@@ -86,7 +86,7 @@ struct eventdemo {
struct widget *widget;
struct display *display;
unsigned int x, y, w, h;
int x, y, w, h;
};
/**
+1 -1
View File
@@ -63,7 +63,7 @@ struct gear_template {
GLfloat tooth_depth;
};
const static struct gear_template gear_templates[] = {
static const struct gear_template gear_templates[] = {
{ { 0.8, 0.1, 0.0, 1.0 }, 1.0, 4.0, 1.0, 20, 0.7 },
{ { 0.0, 0.8, 0.2, 1.0 }, 0.5, 2.0, 2.0, 10, 0.7 },
{ { 0.2, 0.2, 1.0, 1.0 }, 1.3, 2.0, 0.5, 10, 0.7 },
+1 -1
View File
@@ -257,7 +257,7 @@ reset_strip (ModeInfo *mi, strip *s)
(i < GRID_SIZE-5) && /* display approx. once per 5 strips */
!(random() % (GRID_SIZE-5)*5))
{
int j;
unsigned int j;
char text[80];
time_t now = time ((time_t *) 0);
struct tm *tm = localtime (&now);
+1 -1
View File
@@ -166,7 +166,7 @@ touch_paint(struct touch *touch, int32_t x, int32_t y, int32_t id)
0xffff00ff,
};
if (id < ARRAY_LENGTH(colors))
if (id < (int32_t) ARRAY_LENGTH(colors))
c = colors[id];
else
c = 0xffffffff;
+3 -3
View File
@@ -95,7 +95,7 @@ init_state_machine(struct utf8_state_machine *machine)
}
static enum utf8_state
utf8_next_char(struct utf8_state_machine *machine, char c)
utf8_next_char(struct utf8_state_machine *machine, unsigned char c)
{
switch(machine->state) {
case utf8state_start:
@@ -861,7 +861,7 @@ terminal_send_selection(struct terminal *terminal, int fd)
struct glyph_run {
struct terminal *terminal;
cairo_t *cr;
int count;
unsigned int count;
union decoded_attr attr;
cairo_glyph_t glyphs[256], *g;
};
@@ -1864,7 +1864,7 @@ escape_append_utf8(struct terminal *terminal, union utf8_char utf8)
static void
terminal_data(struct terminal *terminal, const char *data, size_t length)
{
int i;
unsigned int i;
union utf8_char utf8;
enum utf8_state parser_state;
+1 -1
View File
@@ -166,7 +166,7 @@ struct input {
struct wl_input_device *input_device;
struct window *pointer_focus;
struct window *keyboard_focus;
uint32_t current_pointer_image;
int current_pointer_image;
uint32_t modifiers;
int32_t sx, sy;
struct wl_list link;
+2 -2
View File
@@ -39,8 +39,8 @@ struct ModeInfo {
struct widget *widget;
int instance_number;
unsigned width;
unsigned height;
int width;
int height;
unsigned long polygon_count;
int fps_p;