macros: split macro NM_GOBJECT_PROPERTIES_DEFINE() in two
authorThomas Haller <thaller@redhat.com>
Fri, 19 Feb 2016 18:59:05 +0000 (19:59 +0100)
committerThomas Haller <thaller@redhat.com>
Fri, 19 Feb 2016 18:59:05 +0000 (19:59 +0100)
Sometimes we don't need the _notify() helper which results in a
unused-function warning.

shared/nm-macros-internal.h

index 348f832..9971f15 100644 (file)
@@ -271,13 +271,16 @@ _NM_IN_STRSET_streq (const char *x, const char *s)
 
 /*****************************************************************************/
 
-#define NM_GOBJECT_PROPERTIES_DEFINE(obj_type, ...) \
+#define NM_GOBJECT_PROPERTIES_DEFINE_BASE(...) \
 typedef enum { \
        _PROPERTY_ENUMS_0, \
        __VA_ARGS__ \
        _PROPERTY_ENUMS_LAST, \
 } _PropertyEnums; \
-static GParamSpec *obj_properties[_PROPERTY_ENUMS_LAST] = { NULL, }; \
+static GParamSpec *obj_properties[_PROPERTY_ENUMS_LAST] = { NULL, }
+
+#define NM_GOBJECT_PROPERTIES_DEFINE(obj_type, ...) \
+NM_GOBJECT_PROPERTIES_DEFINE_BASE (__VA_ARGS__); \
 static inline void \
 _notify (obj_type *obj, _PropertyEnums prop) \
 { \