[gnome-commander] gnome-cmd-file-popmenu.cc: fix for -Wshadow
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] gnome-cmd-file-popmenu.cc: fix for -Wshadow
- Date: Fri, 28 Apr 2017 21:40:52 +0000 (UTC)
commit 05f48f789c924c732c38d8a5783c86d55f60b13e
Author: Mamoru TASAKA <mtasaka fedoraproject org>
Date: Sun Apr 23 14:45:33 2017 +0900
gnome-cmd-file-popmenu.cc: fix for -Wshadow
src/gnome-cmd-file-popmenu.cc:300:12: error: switch missing default case [-Werror=switch-default]
likewise
src/gnome-cmd-file-popmenu.cc | 34 +++++++++++++++++-----------------
1 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/src/gnome-cmd-file-popmenu.cc b/src/gnome-cmd-file-popmenu.cc
index 688fd3e..8802d6a 100644
--- a/src/gnome-cmd-file-popmenu.cc
+++ b/src/gnome-cmd-file-popmenu.cc
@@ -482,7 +482,7 @@ inline gchar *get_default_application_action_name (GList *files, gchar **icon_pa
GtkWidget *gnome_cmd_file_popmenu_new (GnomeCmdFileList *fl)
{
gint pos, match_count;
- GList *vfs_apps, *tmp;
+ GList *vfs_apps, *tmp_list;
// Make place for separator and open with other...
static GnomeUIInfo apps_uiinfo[MAX_OPEN_WITH_APPS+2];
@@ -534,7 +534,7 @@ GtkWidget *gnome_cmd_file_popmenu_new (GnomeCmdFileList *fl)
gint i = -1;
menu->priv->data_list = NULL;
- vfs_apps = tmp = gnome_vfs_mime_get_all_applications (f->info->mime_type);
+ vfs_apps = tmp_list = gnome_vfs_mime_get_all_applications (f->info->mime_type);
for (; vfs_apps && i < MAX_OPEN_WITH_APPS; vfs_apps = vfs_apps->next)
{
GnomeVFSMimeApplication *vfs_app = (GnomeVFSMimeApplication *) vfs_apps->data;
@@ -568,17 +568,17 @@ GtkWidget *gnome_cmd_file_popmenu_new (GnomeCmdFileList *fl)
apps_uiinfo[i].user_data = files;
apps_uiinfo[i].pixmap_type = GNOME_APP_PIXMAP_NONE;
- gnome_vfs_mime_application_list_free (tmp);
+ gnome_vfs_mime_application_list_free (tmp_list);
apps_uiinfo[++i].type = GNOME_APP_UI_ENDOFINFO;
// Set default callback data
- for (gint i=0; open_uiinfo[i].type != GNOME_APP_UI_ENDOFINFO; ++i)
- if (open_uiinfo[i].type == GNOME_APP_UI_ITEM)
- open_uiinfo[i].user_data = fl;
+ for (gint j=0; open_uiinfo[j].type != GNOME_APP_UI_ENDOFINFO; ++j)
+ if (open_uiinfo[j].type == GNOME_APP_UI_ITEM)
+ open_uiinfo[j].user_data = fl;
- for (gint i=0; other_uiinfo[i].type != GNOME_APP_UI_ENDOFINFO; ++i)
- if (other_uiinfo[i].type == GNOME_APP_UI_ITEM)
- other_uiinfo[i].user_data = fl;
+ for (gint j=0; other_uiinfo[j].type != GNOME_APP_UI_ENDOFINFO; ++j)
+ if (other_uiinfo[j].type == GNOME_APP_UI_ITEM)
+ other_uiinfo[j].user_data = fl;
open_uiinfo[0].label = get_default_application_action_name(files, (gchar **)
&open_uiinfo[0].pixmap_info); // must be freed after gnome_app_fill_menu ()
open_uiinfo[0].pixmap_type = open_uiinfo[0].pixmap_info ? GNOME_APP_PIXMAP_FILENAME :
GNOME_APP_PIXMAP_NONE;
@@ -599,9 +599,9 @@ GtkWidget *gnome_cmd_file_popmenu_new (GnomeCmdFileList *fl)
// Add favorite applications
match_count = 0;
- for (GList *i=gnome_cmd_data.options.fav_apps; i; i = i->next)
+ for (GList *j=gnome_cmd_data.options.fav_apps; j; j = j->next)
{
- GnomeCmdApp *app = (GnomeCmdApp *) i->data;
+ GnomeCmdApp *app = (GnomeCmdApp *) j->data;
if (fav_app_matches_files (app, files))
{
add_fav_app_menu_item (menu, app, pos++, files);
@@ -609,9 +609,9 @@ GtkWidget *gnome_cmd_file_popmenu_new (GnomeCmdFileList *fl)
}
}
- for (GList *i=plugin_manager_get_all (); i; i = i->next)
+ for (GList *j=plugin_manager_get_all (); j; j = j->next)
{
- PluginData *data = (PluginData *) i->data;
+ PluginData *data = (PluginData *) j->data;
if (data->active)
{
GList *items = gnome_cmd_plugin_create_popup_menu_items (data->plugin, main_win->get_state());
@@ -699,11 +699,11 @@ GtkWidget *gnome_cmd_file_popmenu_new (GnomeCmdFileList *fl)
string s (user_dir);
s.append ("/").append ((char*) l->data);
- FILE *f = fopen (s.c_str (), "r");
- if (f)
+ FILE *ff = fopen (s.c_str (), "r");
+ if (ff)
{
char buf[256];
- while (fgets (buf, 256, f))
+ while (fgets (buf, 256, ff))
{
if (strncmp (buf, "#name:", 6) == 0)
{
@@ -716,7 +716,7 @@ GtkWidget *gnome_cmd_file_popmenu_new (GnomeCmdFileList *fl)
data->term = strncmp (buf + 7, "true", 4) == 0;
}
}
- fclose (f);
+ fclose (ff);
}
data->name = g_strdup (s.c_str ());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]