diff options
author | Gerald Combs <gerald@wireshark.org> | 2017-12-14 14:13:39 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2017-12-14 23:43:38 +0000 |
commit | 90102ad12ec601abcc2270e4779f8d2fc1c0c937 (patch) | |
tree | 49a63bad606de772ae1500e06d8e55a5ffeb65d5 /ui/gtk/main_menubar.c | |
parent | afc6e773dc84ddcf57af59e0fd87ab1625204786 (diff) |
Remove a plugin_if_gui_cb type conversion.
We always pass a GHashTable * to plugin_if_gui_cb so don't cast it to a
gconstpointer. This should fix the following and related warnings:
main_window.cpp: In function ‘void plugin_if_mainwindow_apply_filter(gconstpointer)’:
main_window.cpp:121:44: warning: cast from type ‘gconstpointer {aka const void*}’ to type ‘GHashTable* {aka _GHashTable*}’ casts away qualifiers [-Wcast-qual]
GHashTable * data_set = (GHashTable *) user_data;
Fix another const warning while we're here.
Change-Id: Ia9225188bfb913feb4fef4369f10fd5791fc8dc9
Reviewed-on: https://code.wireshark.org/review/24830
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/gtk/main_menubar.c')
-rw-r--r-- | ui/gtk/main_menubar.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/gtk/main_menubar.c b/ui/gtk/main_menubar.c index 31720adc69..7b482f42b6 100644 --- a/ui/gtk/main_menubar.c +++ b/ui/gtk/main_menubar.c @@ -141,7 +141,7 @@ static void colorize_cb(GtkWidget *w, gpointer d); static void rebuild_protocol_prefs_menu (module_t *prefs_module_p, gboolean preferences, GtkUIManager *ui_menu, const char *path); -static void plugin_if_menubar_preference(gconstpointer user_data); +static void plugin_if_menubar_preference(GHashTable *dataSet); /* As a general GUI guideline, we try to follow the Gnome Human Interface Guidelines, which can be found at: @@ -5404,11 +5404,10 @@ ws_menubar_external_menus(void) } } -void plugin_if_menubar_preference(gconstpointer user_data) +void plugin_if_menubar_preference(GHashTable *dataSet) { - if ( user_data != NULL ) + if ( dataSet != NULL ) { - GHashTable * dataSet = (GHashTable *) user_data; const char * module_name; const char * pref_name; const char * pref_value; |