Wireshark mailing list archives

Warnings with MAIN_MENU_USE_UIMANAGER


From: Joerg Mayer <jmayer () loplof de>
Date: Wed, 13 Oct 2010 20:36:29 +0200

Hello,

I am curious as to what all these UIMANAGER patches do - it looks
like I missed what's going on here. So I decided to enable it and
compilation didn't work any more due to -Werror and hitting some
warnings. The attached patch makes things compile for me again.
They may or may not be correct, that's why I paste them here.

Ciao
     Joerg

Index: gtk/menus.c
===================================================================
--- gtk/menus.c (revision 34500)
+++ gtk/menus.c (working copy)
@@ -478,13 +478,13 @@
 
 #ifdef MAIN_MENU_USE_UIMANAGER
 static void
-goto_next_frame_conversation_cb(GtkAction *action _U_, gpointer user_data)
+goto_next_frame_conversation_cb(GtkAction *action _U_, gpointer user_data _U_)
 {
     goto_conversation_frame(FALSE);
 }
 
 static void
-goto_previous_frame_conversation_cb(GtkAction *action _U_, gpointer user_data)
+goto_previous_frame_conversation_cb(GtkAction *action _U_, gpointer user_data _U_)
 {
     goto_conversation_frame(TRUE);
 }
@@ -4282,6 +4282,7 @@
 
 
 
+#ifndef MAIN_MENU_USE_UIMANAGER
 /* remove the capture filename from the "Recent Files" menu */
 static void
 remove_menu_recent_capture_filename(gchar *cf_name) {
@@ -4325,7 +4326,7 @@
 
     update_menu_recent_capture_file(submenu_recent_files);
 }
-
+#endif
 
 /* remove the capture filename from the "Recent Files" menu */
 static void
@@ -4389,7 +4390,7 @@
 }
 
 static void
-recent_clear_cb(GtkAction *action, gpointer   user_data)
+recent_clear_cb(GtkAction *action _U_, gpointer user_data _U_)
 {
        GtkWidget *submenu_recent_files;
        GList *recent_files_list;
@@ -4408,7 +4409,7 @@
 }
 
 static void
-recent_activate_cb (GtkAction *action, gpointer   user_data)
+recent_activate_cb (GtkAction *action _U_, gpointer user_data _U_)
 {
 #if 0
   recent_item_activated_cb (NULL,
Index: gtk/menus.h
===================================================================
--- gtk/menus.h (revision 34500)
+++ gtk/menus.h (working copy)
@@ -29,7 +29,7 @@
 extern "C" {
 #endif /* __cplusplus */
 
-/*#define MAIN_MENU_USE_UIMANAGER 1 */
+#define MAIN_MENU_USE_UIMANAGER 1
 
        /* Add a new recent capture filename to the "Recent Files" submenu
    (duplicates will be ignored) */
-- 
Joerg Mayer                                           <jmayer () loplof de>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: