[gnome-online-accounts: 6/8] daemon: Silence -Wshadow
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts: 6/8] daemon: Silence -Wshadow
- Date: Wed, 1 Nov 2017 15:41:31 +0000 (UTC)
commit 61923afd08d848c3ec760fdcb321d7d381e76f57
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Nov 1 14:58:46 2017 +0100
daemon: Silence -Wshadow
src/daemon/goadaemon.c | 43 +++++++++++++++++++++++--------------------
1 files changed, 23 insertions(+), 20 deletions(-)
---
diff --git a/src/daemon/goadaemon.c b/src/daemon/goadaemon.c
index 4616e5e..31d2074 100644
--- a/src/daemon/goadaemon.c
+++ b/src/daemon/goadaemon.c
@@ -728,7 +728,6 @@ process_config_entries (GoaDaemon *self,
GHashTable *group_name_to_key_file_data)
{
GHashTableIter iter;
- const gchar *group;
KeyFileData *key_file_data;
GList *existing_object_paths = NULL;
GList *config_object_paths = NULL;
@@ -751,28 +750,32 @@ process_config_entries (GoaDaemon *self,
g_list_free_full (existing_objects, g_object_unref);
}
- g_hash_table_iter_init (&iter, group_name_to_key_file_data);
- while (g_hash_table_iter_next (&iter, (gpointer*) &group, (gpointer*) &key_file_data))
- {
- const gchar *id;
- gchar *object_path;
-
- if (!g_str_has_prefix (group, "Account "))
- continue;
+ {
+ const gchar *group;
- id = account_group_to_id (group);
+ g_hash_table_iter_init (&iter, group_name_to_key_file_data);
+ while (g_hash_table_iter_next (&iter, (gpointer*) &group, (gpointer*) &key_file_data))
+ {
+ const gchar *id;
+ gchar *object_path;
- /* create and validate object path */
- object_path = g_strdup_printf ("/org/gnome/OnlineAccounts/Accounts/%s", id);
- if (strstr (id, "/") != NULL || !g_variant_is_object_path (object_path))
- {
- g_warning ("`%s' is not a valid account identifier", group);
- g_free (object_path);
+ if (!g_str_has_prefix (group, "Account "))
continue;
- }
- /* steals object_path variable */
- config_object_paths = g_list_prepend (config_object_paths, object_path);
- }
+
+ id = account_group_to_id (group);
+
+ /* create and validate object path */
+ object_path = g_strdup_printf ("/org/gnome/OnlineAccounts/Accounts/%s", id);
+ if (strstr (id, "/") != NULL || !g_variant_is_object_path (object_path))
+ {
+ g_warning ("`%s' is not a valid account identifier", group);
+ g_free (object_path);
+ continue;
+ }
+ /* steals object_path variable */
+ config_object_paths = g_list_prepend (config_object_paths, object_path);
+ }
+ }
existing_object_paths = g_list_sort (existing_object_paths, (GCompareFunc) g_strcmp0);
config_object_paths = g_list_sort (config_object_paths, (GCompareFunc) g_strcmp0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]