extcap.c: fix compilation with gcc 8
extcap.c:228:37: error: cast between incompatible function types from ‘void (*)(iface_toolbar_value *)’ {aka ‘void (*)(struct _iface_toolbar_value *)’} to ‘void (*)(void *, void *)’ [-Werror=cast-function-type] extcap.c:246:39: error: cast between incompatible function types from ‘void (*)(iface_toolbar_control *)’ {aka ‘void (*)(struct _iface_toolbar_control *)’} to ‘void (*)(void *, void *)’ [-Werror=cast-function-type] extcap.c:521:32: error: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Werror=cast-function-type] extcap.c:1440:35: error: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Werror=cast-function-type] Change-Id: I2422e9b59c288907882c9ffd57cbae12011f7832 Reviewed-on: https://code.wireshark.org/review/27264 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
acdda66ce8
commit
ac1c1c3e58
16
extcap.c
16
extcap.c
|
@ -225,8 +225,7 @@ extcap_free_toolbar_control(iface_toolbar_control *control)
|
|||
if (control->ctrl_type == INTERFACE_TYPE_STRING) {
|
||||
g_free(control->default_value.string);
|
||||
}
|
||||
g_list_foreach(control->values, (GFunc)extcap_free_toolbar_value, NULL);
|
||||
g_list_free(control->values);
|
||||
g_list_free_full(control->values, (GDestroyNotify)extcap_free_toolbar_value);
|
||||
g_free(control);
|
||||
}
|
||||
|
||||
|
@ -243,8 +242,7 @@ extcap_free_toolbar(gpointer data)
|
|||
g_free(toolbar->menu_title);
|
||||
g_free(toolbar->help);
|
||||
g_list_free_full(toolbar->ifnames, g_free);
|
||||
g_list_foreach(toolbar->controls, (GFunc)extcap_free_toolbar_control, NULL);
|
||||
g_list_free(toolbar->controls);
|
||||
g_list_free_full(toolbar->controls, (GDestroyNotify)extcap_free_toolbar_control);
|
||||
g_free(toolbar);
|
||||
}
|
||||
|
||||
|
@ -518,8 +516,7 @@ static void extcap_free_interfaces(GList *interfaces)
|
|||
return;
|
||||
}
|
||||
|
||||
g_list_foreach(interfaces, (GFunc)extcap_free_interface, NULL);
|
||||
g_list_free(interfaces);
|
||||
g_list_free_full(interfaces, extcap_free_interface);
|
||||
}
|
||||
|
||||
static gint
|
||||
|
@ -1383,6 +1380,11 @@ GPtrArray *extcap_prepare_arguments(interface_options *interface_opts)
|
|||
return result;
|
||||
}
|
||||
|
||||
static void ptr_array_free(gpointer data, gpointer user_data _U_)
|
||||
{
|
||||
g_free(data);
|
||||
}
|
||||
|
||||
/* call mkfifo for each extcap,
|
||||
* returns FALSE if there's an error creating a FIFO */
|
||||
gboolean
|
||||
|
@ -1437,7 +1439,7 @@ extcap_init_interfaces(capture_options *capture_opts)
|
|||
|
||||
pid = ws_pipe_spawn_async(pipedata, args);
|
||||
|
||||
g_ptr_array_foreach(args, (GFunc)g_free, NULL);
|
||||
g_ptr_array_foreach(args, ptr_array_free, NULL);
|
||||
g_ptr_array_free(args, TRUE);
|
||||
|
||||
if (pid == WS_INVALID_PID)
|
||||
|
|
Loading…
Reference in New Issue