diff options
author | Thomas Haller <thaller@redhat.com> | 2019-11-09 10:49:34 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-11-25 12:58:33 +0100 |
commit | b8b8ef76000b7c659378ef1481ba5541437e519a (patch) | |
tree | 7385dbd17b257b266d56525a463a3080591b6e15 | |
parent | 58811e019def43b9b6b83bb27a4cc076166eee48 (diff) | |
download | NetworkManager-b8b8ef76000b7c659378ef1481ba5541437e519a.tar.gz |
shared: mark _notify() function as "_nm_unused"
There are two macros: NM_GOBJECT_PROPERTIES_DEFINE_BASE() and
NM_GOBJECT_PROPERTIES_DEFINE(). The former just defines the
property enums and the obj_properties array. The latter also
defines the functions _notify() and _nm_gobject_notify_together_impl().
That means, depending on whether you actually use _notify(), you have
to choose one of the macros. I think that is unnecessarily cumbersome.
Let's mark the function as _nm_unused so that the compiler doesn't
complain about the unused function. I don't think it's a problem
to use NM_GOBJECT_PROPERTIES_DEFINE() even if you don't actually use
_notify().
-rw-r--r-- | shared/nm-glib-aux/nm-macros-internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shared/nm-glib-aux/nm-macros-internal.h b/shared/nm-glib-aux/nm-macros-internal.h index 81b56b583e..e2cc7eadab 100644 --- a/shared/nm-glib-aux/nm-macros-internal.h +++ b/shared/nm-glib-aux/nm-macros-internal.h @@ -1043,7 +1043,7 @@ _nm_gobject_notify_together_impl (obj_type *obj, guint n, const property_enums_t g_object_thaw_notify ((GObject *) obj); \ } \ \ -static inline void \ +_nm_unused static inline void \ _notify (obj_type *obj, property_enums_type prop) \ { \ _nm_gobject_notify_together_impl (obj, 1, &prop); \ |