util-object: define the cleanup helper functions as used

Cuts down on approximately a million compiler warnings with clang.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2022-03-01 14:58:58 +10:00
parent 6afd5c2f94
commit d6a654adcc

View file

@ -115,7 +115,7 @@ struct type_ * type_##_unref(struct type_ *obj) { \
if (!obj) return NULL; \
return object_unref(&obj->object); \
} \
static inline void type_##_unrefp(struct type_ **p_) { \
__attribute__((used)) static inline void type_##_unrefp(struct type_ **p_) { \
if (*p_) type_##_unref(*p_); \
} \
struct __useless_struct_to_allow_trailing_semicolon__