Skip to content
  • Lubomir Rintel's avatar
    active-connection: fix build with clang-6.0 · 6c2eb953
    Lubomir Rintel authored
    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.
    6c2eb953