[gconf] Silence some gcc compiler warnings
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Subject: [gconf] Silence some gcc compiler warnings
- Date: Wed, 15 Jul 2009 18:01:45 +0000 (UTC)
commit 8bad97390ee8cd1203908139d03c4f5678ac4ef4
Author: Colin Walters <walters verbum org>
Date: Wed Jul 15 13:49:12 2009 -0400
Silence some gcc compiler warnings
None of these are actual problems, but it's good to keep the
compiler output quiet.
backends/markup-tree.c | 6 +++---
gconf/gconf-client.c | 11 ++++++-----
gconf/gconf-locale.c | 8 ++++----
3 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/backends/markup-tree.c b/backends/markup-tree.c
index d5bfcfa..c08d6c7 100644
--- a/backends/markup-tree.c
+++ b/backends/markup-tree.c
@@ -2588,9 +2588,9 @@ parse_value_element (GMarkupParseContext *context,
case GCONF_VALUE_BOOL:
case GCONF_VALUE_FLOAT:
{
- double fval;
- gboolean bval;
- int ival;
+ double fval = 0.0;
+ gboolean bval = FALSE;
+ int ival = 0;
if (value == NULL)
{
diff --git a/gconf/gconf-client.c b/gconf/gconf-client.c
index 98f2051..1fad73e 100644
--- a/gconf/gconf-client.c
+++ b/gconf/gconf-client.c
@@ -1090,18 +1090,19 @@ gconf_client_all_entries (GConfClient* client,
if (g_hash_table_lookup (client->cache_dirs, dir))
{
GHashTableIter iter;
- gchar *key;
- GConfEntry *entry;
+ gpointer key, value;
trace ("CACHED: Getting all values in '%s'", dir);
dirlen = strlen (dir);
retval = NULL;
g_hash_table_iter_init (&iter, client->cache_hash);
- while (g_hash_table_iter_next (&iter, &key, &entry))
+ while (g_hash_table_iter_next (&iter, &key, &value))
{
- if (g_str_has_prefix (key, dir) &&
- key + dirlen == strrchr (key, '/'))
+ const gchar *id = key;
+ GConfEntry *entry = value;
+ if (g_str_has_prefix (id, dir) &&
+ id + dirlen == strrchr (id, '/'))
retval = g_slist_prepend (retval, gconf_entry_copy (entry));
}
diff --git a/gconf/gconf-locale.c b/gconf/gconf-locale.c
index e41fec6..b01ae4c 100644
--- a/gconf/gconf-locale.c
+++ b/gconf/gconf-locale.c
@@ -273,10 +273,10 @@ compute_locale_variants (const gchar *locale)
{
GSList *retval = NULL;
- gchar *language;
- gchar *territory;
- gchar *codeset;
- gchar *modifier;
+ gchar *language = NULL;
+ gchar *territory = NULL;
+ gchar *codeset = NULL;
+ gchar *modifier = NULL;
guint mask;
guint i;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]