mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 07:00:13 +01:00
n-acd: don't use a return value in deallocator
...so that its prototype is compatible with GDestroyNotify:
src/devices/nm-acd-manager.c: In function ‘destroy_address_info’:
/usr/include/glib-2.0/glib/gmem.h:120:31: error: cast between incompatible function types from ‘NAcd * (*)(NAcd *)’ {aka ‘struct NAcd * (*)(struct NAcd *)’} to ‘void (*)(void *)’ [-Werror=cast-function-type]
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
^
src/devices/nm-acd-manager.c:430:2: note: in expansion of macro ‘g_clear_pointer’
g_clear_pointer (&info->acd, n_acd_free);
^~~~~~~~~~~~~~~
The same change was done upstream, so the subsequent subtree pull of n-acd
won't mess this up.
This commit is contained in:
parent
c898969110
commit
de8bf7421d
2 changed files with 3 additions and 5 deletions
|
|
@ -302,11 +302,11 @@ error:
|
|||
*
|
||||
* Return: NULL.
|
||||
*/
|
||||
_public_ NAcd *n_acd_free(NAcd *acd) {
|
||||
_public_ void n_acd_free(NAcd *acd) {
|
||||
NAcdEventNode *node;
|
||||
|
||||
if (!acd)
|
||||
return NULL;
|
||||
return;
|
||||
|
||||
n_acd_reset(acd);
|
||||
|
||||
|
|
@ -330,8 +330,6 @@ _public_ NAcd *n_acd_free(NAcd *acd) {
|
|||
}
|
||||
|
||||
free(acd);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ enum {
|
|||
};
|
||||
|
||||
int n_acd_new(NAcd **acdp);
|
||||
NAcd *n_acd_free(NAcd *acd);
|
||||
void n_acd_free(NAcd *acd);
|
||||
|
||||
void n_acd_get_fd(NAcd *acd, int *fdp);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue