From 5bf8da8a4cd5381d1d206ce7074690dba463dba0 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 17 Feb 2018 10:40:23 -0800 Subject: [PATCH] Fix casts. A gconstpointer is a "pointer to const void", so it should be cast to "pointer to const XXX". A "pointer to const pointer to plugin" is a "plugin *const *". C's declaration syntax is not one of its strong points. There's a reason why the cdecl program, and the Web site that uses it, http://cdecl.org, exists (as the tag line says, "C gibberish <-> English"), and why I used it to make sure I got this working. Change-Id: Ia29bb25d17a1255a06b4ace542643c4b494d4977 Reviewed-on: https://code.wireshark.org/review/25835 Reviewed-by: Guy Harris --- wsutil/plugins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wsutil/plugins.c b/wsutil/plugins.c index 0b9b526afb..db1479d8df 100644 --- a/wsutil/plugins.c +++ b/wsutil/plugins.c @@ -93,7 +93,7 @@ free_plugin(gpointer data) static gint compare_plugins(gconstpointer a, gconstpointer b) { - return g_strcmp0((*(const plugin **)a)->name, (*(const plugin **)b)->name); + return g_strcmp0((*(plugin *const *)a)->name, (*(plugin *const *)b)->name); } static void