[devhelp/wip/swilmet/fix-warnings: 1/2] App: fix warnings about variable shadowing a global declaration



commit dcba28a945551c341337238f1256893b494cf3cc
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Nov 27 12:12:04 2016 +0100

    App: fix warnings about variable shadowing a global declaration
    
    'options' is already declared for the GOptionEntry array.

 src/dh-app.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/dh-app.c b/src/dh-app.c
index e474df4..e10b304 100644
--- a/src/dh-app.c
+++ b/src/dh-app.c
@@ -570,7 +570,7 @@ static GOptionEntry options[] = {
 
 static gint
 dh_app_handle_local_options (GApplication *app,
-                             GVariantDict *options)
+                             GVariantDict *local_options)
 {
   if (option_version)
     {
@@ -589,13 +589,13 @@ dh_app_command_line (GApplication            *app,
         const gchar *option_search = NULL;
         const gchar *option_search_assistant = NULL;
         gboolean option_quit = FALSE;
-        GVariantDict *options;
+        GVariantDict *options_dict;
 
-        options = g_application_command_line_get_options_dict (command_line);
-        g_variant_dict_lookup (options, "new-window", "b", &option_new_window);
-        g_variant_dict_lookup (options, "search", "&s", &option_search);
-        g_variant_dict_lookup (options, "search-assistant", "&s", &option_search_assistant);
-        g_variant_dict_lookup (options, "quit", "b", &option_quit);
+        options_dict = g_application_command_line_get_options_dict (command_line);
+        g_variant_dict_lookup (options_dict, "new-window", "b", &option_new_window);
+        g_variant_dict_lookup (options_dict, "search", "&s", &option_search);
+        g_variant_dict_lookup (options_dict, "search-assistant", "&s", &option_search_assistant);
+        g_variant_dict_lookup (options_dict, "quit", "b", &option_quit);
 
         if (option_new_window) {
                 dh_app_new_window (DH_APP (app));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]