Fix a couple of harmless compiler warnings

In each widget's *_geometry function, two warnings were generated, e.g.:
 warning: ‘geometry.y’ is used uninitialized in this function
 warning: ‘geometry.x’ is used uninitialized in this function

Found by gogonkt with GCC 4.2.4 on gentoo.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2009-05-24 12:17:15 +02:00 committed by Julien Danjou
parent ce6eb86889
commit df0df1bc37
5 changed files with 9 additions and 0 deletions

View File

@ -153,6 +153,7 @@ graph_geometry(widget_t *widget, screen_t *screen, int height, int width)
area_t geometry;
graph_data_t *d = widget->data;
geometry.x = geometry.y = 0;
geometry.height = height;
geometry.width = d->width;

View File

@ -69,6 +69,8 @@ imagebox_geometry(widget_t *widget, screen_t *screen, int height, int width)
geometry.height = 0;
}
geometry.x = geometry.y = 0;
return geometry;
}

View File

@ -158,6 +158,8 @@ progressbar_geometry(widget_t *widget, screen_t *screen, int height, int width)
geometry.width = pb_width + 2 * (d->border_width + d->border_padding);
}
geometry.x = geometry.y = 0;
return geometry;
}

View File

@ -45,6 +45,8 @@ systray_geometry(widget_t *widget, screen_t *screen, int height, int width)
/** \todo use class hints */
geometry.width = MIN(n * height, width);
geometry.x = geometry.y = 0;
return geometry;
}

View File

@ -72,6 +72,8 @@ textbox_geometry(widget_t *widget, screen_t *screen, int height, int width)
else
geometry.width = MIN(d->extents.width + d->margin.left + d->margin.right, width);
geometry.x = geometry.y = 0;
return geometry;
}