aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/main_filter_toolbar.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2017-12-14 14:13:39 -0800
committerGerald Combs <gerald@wireshark.org>2017-12-14 23:43:38 +0000
commit90102ad12ec601abcc2270e4779f8d2fc1c0c937 (patch)
tree49a63bad606de772ae1500e06d8e55a5ffeb65d5 /ui/gtk/main_filter_toolbar.c
parentafc6e773dc84ddcf57af59e0fd87ab1625204786 (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_filter_toolbar.c')
-rw-r--r--ui/gtk/main_filter_toolbar.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ui/gtk/main_filter_toolbar.c b/ui/gtk/main_filter_toolbar.c
index 24b8c862d4..4ab9dc3ce1 100644
--- a/ui/gtk/main_filter_toolbar.c
+++ b/ui/gtk/main_filter_toolbar.c
@@ -113,7 +113,7 @@ filter_save_cb(GtkWidget *w _U_, GtkWindow *parent_w)
}
static void
-plugin_if_filter_apply(gconstpointer user_data)
+plugin_if_filter_apply(GHashTable * dataSet)
{
/* code is derived from voip_calls_dlg.c::voip_calls_on_filter */
@@ -121,11 +121,8 @@ plugin_if_filter_apply(gconstpointer user_data)
size_t max_filter_length = 2048;
gchar *filter_string;
- if ( main_display_filter_widget != 0 )
+ if ( main_display_filter_widget != 0 && dataSet != 0 )
{
-
- GHashTable * dataSet = (GHashTable *) user_data;
-
if ( g_hash_table_lookup_extended(dataSet, "filter_string", NULL, NULL ) )
{
filter_string = g_strndup((const char *)g_hash_table_lookup(dataSet, "filter_string"), max_filter_length);