Fix compiler warnings
theme-thumbnail-engine.c: In function 'message_from_capplet': theme-thumbnail-engine.c:642: warning: 'pixels' may be used uninitialized in this function theme-thumbnail-engine.c:641: warning: 'rowstride' may be used uninitialized in this function These are actually false positives but no warnings is good (bug #590990).
This commit is contained in:
parent
50fd4403ea
commit
af6a49348c
1 changed files with 6 additions and 6 deletions
|
@ -652,9 +652,6 @@ message_from_capplet (GIOChannel *source,
|
||||||
gchar buffer[1024];
|
gchar buffer[1024];
|
||||||
GIOStatus status;
|
GIOStatus status;
|
||||||
gsize bytes_read;
|
gsize bytes_read;
|
||||||
GdkPixbuf *pixbuf;
|
|
||||||
gint i, rowstride;
|
|
||||||
guchar *pixels;
|
|
||||||
ThemeThumbnailData *theme_thumbnail_data;
|
ThemeThumbnailData *theme_thumbnail_data;
|
||||||
|
|
||||||
theme_thumbnail_data = (ThemeThumbnailData *) data;
|
theme_thumbnail_data = (ThemeThumbnailData *) data;
|
||||||
|
@ -671,9 +668,11 @@ message_from_capplet (GIOChannel *source,
|
||||||
|
|
||||||
if (theme_thumbnail_data->status == WRITING_PIXBUF_DATA)
|
if (theme_thumbnail_data->status == WRITING_PIXBUF_DATA)
|
||||||
{
|
{
|
||||||
char *type;
|
GdkPixbuf *pixbuf = NULL;
|
||||||
|
gint i, rowstride;
|
||||||
|
guchar *pixels;
|
||||||
gint width, height;
|
gint width, height;
|
||||||
type = (char *) theme_thumbnail_data->type->data;
|
const gchar *type = (const gchar *) theme_thumbnail_data->type->data;
|
||||||
|
|
||||||
if (!strcmp (type, THUMBNAIL_TYPE_META))
|
if (!strcmp (type, THUMBNAIL_TYPE_META))
|
||||||
pixbuf = create_meta_theme_pixbuf (theme_thumbnail_data);
|
pixbuf = create_meta_theme_pixbuf (theme_thumbnail_data);
|
||||||
|
@ -687,7 +686,8 @@ message_from_capplet (GIOChannel *source,
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
|
|
||||||
if (pixbuf == NULL) {
|
if (pixbuf == NULL) {
|
||||||
width = height = 0;
|
width = height = rowstride = 0;
|
||||||
|
pixels = NULL;
|
||||||
} else {
|
} else {
|
||||||
width = gdk_pixbuf_get_width (pixbuf);
|
width = gdk_pixbuf_get_width (pixbuf);
|
||||||
height = gdk_pixbuf_get_height (pixbuf);
|
height = gdk_pixbuf_get_height (pixbuf);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue