diff options
author | Thomas Haller <thaller@redhat.com> | 2019-02-08 12:03:06 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-02-08 20:14:50 +0100 |
commit | 6eaf52a5092b67a98a378702e3b847a6e69bd047 (patch) | |
tree | 5c8b1851663fd52da5b8863040ced8b074be6ba2 | |
parent | 2510f60e92a0801b6f66fc80759d45fd2d3c41cf (diff) | |
download | NetworkManager-6eaf52a5092b67a98a378702e3b847a6e69bd047.tar.gz |
wifi/iwd: avoid "-Wstrict-aliasing" warning in nm_device_iwd_set_dbus_object()
The cast is bogus and leads to a compiler warning:
[424/583] Compiling C object src/devices/wifi/914a32e@@nm-device-plugin-wifi@sha/nm-device-iwd.c.o.
In file included from ../shared/nm-default.h:293,
from ../src/devices/wifi/nm-device-iwd.c:21:
../src/devices/wifi/nm-device-iwd.c: In function ‘nm_device_iwd_set_dbus_object’:
../src/devices/wifi/nm-device-iwd.c:2404:28: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
if (!nm_g_object_ref_set ((GObject **) &priv->dbus_obj, (GObject *) object))
../shared/nm-utils/nm-macros-internal.h:1048:13: note: in definition of macro ‘nm_g_object_ref_set’
typeof (*(pp)) *const _pp = (pp); \
^~
-rw-r--r-- | src/devices/wifi/nm-device-iwd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/wifi/nm-device-iwd.c b/src/devices/wifi/nm-device-iwd.c index ff28024cec..5b150e0ca4 100644 --- a/src/devices/wifi/nm-device-iwd.c +++ b/src/devices/wifi/nm-device-iwd.c @@ -2401,7 +2401,7 @@ nm_device_iwd_set_dbus_object (NMDeviceIwd *self, GDBusObject *object) gboolean powered; NMDeviceWifiCapabilities capabilities; - if (!nm_g_object_ref_set ((GObject **) &priv->dbus_obj, (GObject *) object)) + if (!nm_g_object_ref_set (&priv->dbus_obj, object)) return; if (priv->dbus_device_proxy) { |