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().
This commit is contained in:
Thomas Haller 2019-11-09 10:49:34 +01:00
parent 58811e019d
commit b8b8ef7600

View file

@ -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); \