mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 04:08:01 +02:00
active-connection: fix build with clang-6.0
glib 2.56's g_steal_pointer() won't tolerate a function pointer in place
of a gpointer.
CC src/src_libNetworkManager_la-nm-active-connection.lo
src/nm-active-connection.c:1017:17: error: pointer type mismatch
('NMActiveConnectionAuthResultFunc' (aka 'void (*)(struct _NMActiveConnection *,
int, const char *, void *)') and 'gpointer' (aka 'void *'))
[-Werror,-Wpointer-type-mismatch]
result_func = g_steal_pointer (&priv->auth.result_func);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmem.h:200:6: note: expanded from macro 'g_steal_pointer'
(0 ? (*(pp)) : (g_steal_pointer) (pp))
^ ~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
There's just a single spot we use it that way, so it's perhaps better to
work around the warning instead of disabling it.
This commit is contained in:
parent
347e3e3689
commit
6c2eb953d5
1 changed files with 2 additions and 1 deletions
|
|
@ -1014,7 +1014,8 @@ auth_complete (NMActiveConnection *self, gboolean result, const char *message)
|
|||
nm_assert (!priv->auth.call_id_network_control);
|
||||
nm_assert (!priv->auth.call_id_wifi_shared_permission);
|
||||
if (priv->auth.result_func) {
|
||||
result_func = g_steal_pointer (&priv->auth.result_func);
|
||||
result_func = priv->auth.result_func;
|
||||
priv->auth.result_func = NULL;
|
||||
user_data = g_steal_pointer (&priv->auth.user_data);
|
||||
|
||||
result_func (self,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue