aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/main_menubar.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2014-05-01 14:34:19 +0200
committerAnders Broman <a.broman58@gmail.com>2014-05-01 13:48:47 +0000
commitdedc090c71078a35f22e1b1d1afbb98fe97c58bb (patch)
treee84e9a6b13e12095b913443fbd3759798f8429d9 /ui/gtk/main_menubar.c
parentd3d4fb9c795fa99317eed44326ad117e021d6b7f (diff)
Fix -Wunreachable-code found by Clang
Change-Id: I895194655ff674fff5e84fa93b3f9a00a0f70e27 Reviewed-on: https://code.wireshark.org/review/1457 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/gtk/main_menubar.c')
-rw-r--r--ui/gtk/main_menubar.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/ui/gtk/main_menubar.c b/ui/gtk/main_menubar.c
index 86caa0d9ce..463311f93c 100644
--- a/ui/gtk/main_menubar.c
+++ b/ui/gtk/main_menubar.c
@@ -4455,8 +4455,6 @@ void
menu_recent_file_write_all(FILE *rf)
{
GtkWidget *submenu_recent_files;
- GList *children;
- GList *child;
gchar *cf_name;
GList *recent_files_list, *list;
@@ -4477,27 +4475,6 @@ menu_recent_file_write_all(FILE *rf)
list = g_list_previous(list);
}
g_list_free(recent_files_list);
- return;
-
- /* we have to iterate backwards through the children's list,
- * so we get the latest item last in the file.
- * (don't use gtk_container_foreach() here, it will return the wrong iteration order) */
- children = gtk_container_get_children(GTK_CONTAINER(submenu_recent_files));
- child = g_list_last(children);
- while (child != NULL) {
- /* get capture filename from the menu item label */
- cf_name = (gchar *)g_object_get_data(G_OBJECT(child->data), MENU_RECENT_FILES_KEY);
- if (cf_name) {
- if(u3_active())
- fprintf (rf, RECENT_KEY_CAPTURE_FILE ": %s\n", u3_contract_device_path(cf_name));
- else
- fprintf (rf, RECENT_KEY_CAPTURE_FILE ": %s\n", cf_name);
- }
-
- child = g_list_previous(child);
- }
-
- g_list_free(children);
}
void