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 <guy@alum.mit.edu>
This commit is contained in:
parent
f0393a5975
commit
5bf8da8a4c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user