From 80c5178127052e600146ca889500e263da4ebf10 Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Sun, 27 Dec 2009 02:09:44 +0100 Subject: Initialize out variables before using them Here's a small patch for json-glib, to fix some gcc warnings breaking the build with -Werror (gcc can't know if the variable will get initialized or not). I didn't find a product for json-glib in bugzilla, but I guess a mail will work ;-) Happy holidays :-) Signed-off-by: Emmanuele Bassi --- json-glib/json-gobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'json-glib/json-gobject.c') diff --git a/json-glib/json-gobject.c b/json-glib/json-gobject.c index 462a2c8..ae98b2b 100644 --- a/json-glib/json-gobject.c +++ b/json-glib/json-gobject.c @@ -503,7 +503,7 @@ json_deserialize_pspec (GValue *value, case G_TYPE_ENUM: { - gint enum_value; + gint enum_value = 0; if (G_VALUE_HOLDS (&node_value, G_TYPE_INT64)) { @@ -524,7 +524,7 @@ json_deserialize_pspec (GValue *value, case G_TYPE_FLAGS: { - gint flags_value; + gint flags_value = 0; if (G_VALUE_HOLDS (&node_value, G_TYPE_INT64)) { -- cgit v1.2.1