[gnome-control-center] Fix compiler warnings
- From: Jens Granseuer <jensg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Fix compiler warnings
- Date: Sun, 9 Aug 2009 11:01:45 +0000 (UTC)
commit af6a49348c65d5cf28cf3bed40f19ee41285b15d
Author: Jens Granseuer <jensgr gmx net>
Date: Sun Aug 9 12:30:40 2009 +0200
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).
capplets/common/theme-thumbnail.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/capplets/common/theme-thumbnail.c b/capplets/common/theme-thumbnail.c
index 39f8cce..094cb8e 100644
--- a/capplets/common/theme-thumbnail.c
+++ b/capplets/common/theme-thumbnail.c
@@ -652,9 +652,6 @@ message_from_capplet (GIOChannel *source,
gchar buffer[1024];
GIOStatus status;
gsize bytes_read;
- GdkPixbuf *pixbuf;
- gint i, rowstride;
- guchar *pixels;
ThemeThumbnailData *theme_thumbnail_data;
theme_thumbnail_data = (ThemeThumbnailData *) data;
@@ -671,9 +668,11 @@ message_from_capplet (GIOChannel *source,
if (theme_thumbnail_data->status == WRITING_PIXBUF_DATA)
{
- char *type;
+ GdkPixbuf *pixbuf = NULL;
+ gint i, rowstride;
+ guchar *pixels;
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))
pixbuf = create_meta_theme_pixbuf (theme_thumbnail_data);
@@ -687,7 +686,8 @@ message_from_capplet (GIOChannel *source,
g_assert_not_reached ();
if (pixbuf == NULL) {
- width = height = 0;
+ width = height = rowstride = 0;
+ pixels = NULL;
} else {
width = gdk_pixbuf_get_width (pixbuf);
height = gdk_pixbuf_get_height (pixbuf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]