[gnome-commander] Fixes gcc shadowing warning



commit fe6a58ef40cbe29af0e108f230459da62c334fed
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Sat Feb 25 15:38:41 2017 +0100

    Fixes gcc shadowing warning

 src/dialogs/gnome-cmd-advrename-dialog.cc |    4 ++--
 src/gnome-cmd-notebook.h                  |   16 ++++++++--------
 src/gnome-cmd-user-actions.h              |    6 +++---
 src/gnome-cmd-xml-config.h                |    8 ++++----
 src/history.h                             |    2 +-
 src/tags/gnome-cmd-tags.h                 |    6 +++---
 6 files changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-advrename-dialog.cc b/src/dialogs/gnome-cmd-advrename-dialog.cc
index 1e0d6e0..79310dc 100644
--- a/src/dialogs/gnome-cmd-advrename-dialog.cc
+++ b/src/dialogs/gnome-cmd-advrename-dialog.cc
@@ -161,8 +161,8 @@ inline GtkWidget *GnomeCmdAdvrenameDialog::Private::create_placeholder_menu(Gnom
 
     gtk_item_factory_create_items (ifac, items_size, items, this);
 
-    for (guint i=0; i<items_size; ++i)
-        g_free (items[i].path);
+    for (guint ii=0; ii<items_size; ++ii)
+        g_free (items[ii].path);
 
     g_free (items);
 
diff --git a/src/gnome-cmd-notebook.h b/src/gnome-cmd-notebook.h
index f7f9c06..f608925 100644
--- a/src/gnome-cmd-notebook.h
+++ b/src/gnome-cmd-notebook.h
@@ -70,12 +70,12 @@ struct GnomeCmdNotebook
     GtkWidget *page() const             {  return gtk_notebook_get_nth_page (*this, get_current_page());  }
     GtkWidget *page(gint n) const       {  return gtk_notebook_get_nth_page (*this, n);   }
 
-    gint insert_page(GtkWidget *page, gint n, GtkWidget *label=NULL);
-    gint insert_page(GtkWidget *page, gint n, const gchar *label)           {  return insert_page(page, n, 
label ? gtk_label_new (label) : NULL);  }
-    gint prepend_page(GtkWidget *page, GtkWidget *label=NULL)               {  return insert_page(page, 0, 
label);                                 }
-    gint prepend_page(GtkWidget *page, const gchar *label)                  {  return insert_page(page, 0, 
label);   }
-    gint append_page(GtkWidget *page, GtkWidget *label=NULL)                {  return insert_page(page, -1, 
label);                                }
-    gint append_page(GtkWidget *page, const gchar *label)                   {  return insert_page(page, -1, 
label);  }
+    gint insert_page(GtkWidget *page_insert, gint n, GtkWidget *label=NULL);
+    gint insert_page(GtkWidget *page_insert, gint n, const gchar *label)    {  return 
insert_page(page_insert, n, label ? gtk_label_new (label) : NULL);  }
+    gint prepend_page(GtkWidget *page_prepend, GtkWidget *label=NULL)       {  return 
insert_page(page_prepend, 0, label);                                 }
+    gint prepend_page(GtkWidget *page_prepend, const gchar *label)          {  return 
insert_page(page_prepend, 0, label);   }
+    gint append_page(GtkWidget *page_append, GtkWidget *label=NULL)         {  return 
insert_page(page_append, -1, label);                                }
+    gint append_page(GtkWidget *page_append, const gchar *label)            {  return 
insert_page(page_append, -1, label);  }
 
     void remove_page(gint n);
     void remove_page()                                                      {  remove_page 
(get_current_page());                                   }
@@ -96,11 +96,11 @@ struct GnomeCmdNotebook
     int find_tab_num_at_pos(gint screen_x, gint screen_y) const;
 };
 
-inline gint GnomeCmdNotebook::insert_page(GtkWidget *page, gint n, GtkWidget *label)
+inline gint GnomeCmdNotebook::insert_page(GtkWidget *page_insert, gint n, GtkWidget *label)
 {
     if (tabs_visibility==HIDE_TABS_IF_ONE && size()==1)
         gtk_notebook_set_show_tabs (*this, TRUE);
-    return gtk_notebook_insert_page (*this, page, label, n);
+    return gtk_notebook_insert_page (*this, page_insert, label, n);
 }
 
 inline void GnomeCmdNotebook::remove_page(gint n)
diff --git a/src/gnome-cmd-user-actions.h b/src/gnome-cmd-user-actions.h
index 817af98..176045b 100644
--- a/src/gnome-cmd-user-actions.h
+++ b/src/gnome-cmd-user-actions.h
@@ -198,7 +198,7 @@ class GnomeCmdUserActions
     unsigned size()                                                         {  return action.size();         
                         }
 
     const gchar *name(const_iterator &i)                                    {  return 
action_func[i->second.func].c_str();            }
-    const gchar *name(const std::string &description)                       {  return 
action_func[action_name[description]].c_str();  }
+    const gchar *name(const std::string &name_description)                   {  return 
action_func[action_name[name_description]].c_str();  }
     const gchar *description(const_iterator &i)                             {  return 
action_name[i->second.func].c_str();            }
     const gchar *options(const_iterator &i)                                 {  return 
i->second.user_data.c_str();                    }
 
@@ -212,9 +212,9 @@ inline GnomeCmdUserActions::UserAction::UserAction(GnomeCmdUserActionFunc _func,
         user_data = _user_data;
 }
 
-inline gboolean GnomeCmdUserActions::register_action(guint keyval, const gchar *name, const char *user_data)
+inline gboolean GnomeCmdUserActions::register_action(guint keyval, const gchar *action_name, const char 
*user_data)
 {
-    return register_action(0, keyval, name, user_data);
+    return register_action(0, keyval, action_name, user_data);
 }
 
 
diff --git a/src/gnome-cmd-xml-config.h b/src/gnome-cmd-xml-config.h
index 6786b12..85db20d 100644
--- a/src/gnome-cmd-xml-config.h
+++ b/src/gnome-cmd-xml-config.h
@@ -171,12 +171,12 @@ namespace XML
 
         const char *tabs(unsigned offset=0) const
         {
-            static std::string tabs(32,'\t');
+            static std::string mytabs(32,'\t');
 
-            if (tabs.size() <= tags.size())
-                tabs.append(32,'\t');
+            if (mytabs.size() <= tags.size())
+                mytabs.append(32,'\t');
 
-            return tabs.c_str() + tabs.size() - tags.size() + offset;
+            return mytabs.c_str() + mytabs.size() - tags.size() + offset;
         }
 
         // I don't know any way easier (legal) to clear std::stringstream...
diff --git a/src/history.h b/src/history.h
index d856f2e..d49ae92 100644
--- a/src/history.h
+++ b/src/history.h
@@ -33,7 +33,7 @@ class History
 
     GList *ents;
 
-    explicit History(gint max): is_locked(FALSE), pos(NULL), ents(NULL) { this->max = max;}
+    explicit History(gint maxHistory): is_locked(FALSE), pos(NULL), ents(NULL) { this->max = maxHistory;}
     ~History();
 
     History &operator = (GList *list);
diff --git a/src/tags/gnome-cmd-tags.h b/src/tags/gnome-cmd-tags.h
index f03f1a4..c2b720c 100644
--- a/src/tags/gnome-cmd-tags.h
+++ b/src/tags/gnome-cmd-tags.h
@@ -568,12 +568,12 @@ inline void GnomeCmdFileMetadata::add (const GnomeCmdTag tag, std::string value)
         return;
 
     // remove trailing whitespace from a string
-    std::string::size_type end = value.find_last_not_of(" \t\n\r\0",std::string::npos,5);
+    std::string::size_type string_end = value.find_last_not_of(" \t\n\r\0",std::string::npos,5);
 
-    if (end==std::string::npos)
+    if (string_end==std::string::npos)
         return;
 
-    value.erase(end+1);
+    value.erase(string_end+1);
 
     metadata[tag].insert(value);
 }


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