summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-05-07 11:14:26 +0200
committerThomas Haller <thaller@redhat.com>2020-05-07 11:15:22 +0200
commitd170f8b7f26c072760ea05f34ed06a22cf00c7c3 (patch)
treef7c65b3bb4f2473479edc9e981b874188e41c410 /src
parentbe3549abbd59c70ed1334804db4acf8fb9d52837 (diff)
downloadNetworkManager-d170f8b7f26c072760ea05f34ed06a22cf00c7c3.tar.gz
device: fix compilation error "--without-more-asserts"
Defining the name "dispose" breaks object_class->dispose = dispose; below. Fixes: fdba9200c0c0 ('device: avoid coverity warning about unused variable')
Diffstat (limited to 'src')
-rw-r--r--src/devices/nm-device-macvlan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/nm-device-macvlan.c b/src/devices/nm-device-macvlan.c
index 9079bb2b52..3435df1be7 100644
--- a/src/devices/nm-device-macvlan.c
+++ b/src/devices/nm-device-macvlan.c
@@ -471,8 +471,6 @@ dispose (GObject *object)
nm_assert (NM_DEVICE_MACVLAN_GET_PRIVATE (object)->parent_state_id == 0);
nm_assert (NM_DEVICE_MACVLAN_GET_PRIVATE (object)->parent_mtu_id == 0);
}
-#else
-#define dispose ((void (*) (GObject *object)) NULL)
#endif
static const NMDBusInterfaceInfoExtended interface_info_device_macvlan = {
@@ -498,7 +496,9 @@ nm_device_macvlan_class_init (NMDeviceMacvlanClass *klass)
NMDBusObjectClass *dbus_object_class = NM_DBUS_OBJECT_CLASS (klass);
NMDeviceClass *device_class = NM_DEVICE_CLASS (klass);
+#if NM_MORE_ASSERTS
object_class->dispose = dispose;
+#endif
object_class->get_property = get_property;
object_class->set_property = set_property;