summaryrefslogtreecommitdiff
path: root/src/nm-active-connection.c
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2018-05-21 12:01:46 +0200
committerLubomir Rintel <lkundrak@v3.sk>2018-05-21 12:02:26 +0200
commit6c2eb953d50d1255d0b55197f711b2094e98b79a (patch)
tree481e32b7e22136e18fee6777f1b859b6add9559a /src/nm-active-connection.c
parent347e3e36895996e2503250f4d14cc757091cd9d0 (diff)
downloadNetworkManager-6c2eb953d50d1255d0b55197f711b2094e98b79a.tar.gz
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.
Diffstat (limited to 'src/nm-active-connection.c')
-rw-r--r--src/nm-active-connection.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c
index 7cfb0fe78a..aa83d6d5b9 100644
--- a/src/nm-active-connection.c
+++ b/src/nm-active-connection.c
@@ -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,