diff options
author | Thomas Haller <thaller@redhat.com> | 2019-11-09 10:49:34 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-11-09 10:49:47 +0100 |
commit | 25094528b9f0fa938ffb2151c4f36f4b64c3acf4 (patch) | |
tree | c8403b0f47db1832833ad9e3072b89dc609942b8 | |
parent | e9b0830a1d49972dc4344d13132a4046ec8205cd (diff) | |
download | NetworkManager-25094528b9f0fa938ffb2151c4f36f4b64c3acf4.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); \ |