diff options
Diffstat (limited to 'libmisc/include')
-rw-r--r-- | libmisc/include/libmisc/macro.h | 6 | ||||
-rw-r--r-- | libmisc/include/libmisc/obj.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libmisc/include/libmisc/macro.h b/libmisc/include/libmisc/macro.h index ae204ae..9ac29b9 100644 --- a/libmisc/include/libmisc/macro.h +++ b/libmisc/include/libmisc/macro.h @@ -11,6 +11,12 @@ #define LM_FORCE_SEMICOLON static_assert(1, "force semicolon") +#define LM_PARTIAL_SWITCH(VAL) \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wswitch-enum\"") \ + switch (VAL) \ + _Pragma("GCC diagnostic pop") \ + /* for function definitions */ #define LM_UNUSED(argname) diff --git a/libmisc/include/libmisc/obj.h b/libmisc/include/libmisc/obj.h index 76dde91..d30a6f2 100644 --- a/libmisc/include/libmisc/obj.h +++ b/libmisc/include/libmisc/obj.h @@ -83,7 +83,7 @@ /** * `LO_NULL(iface_name)` is the null/nil/zero value for `lo_interface {iface_name}`. */ -#define LO_NULL(_ARG_iface_name) ((lo_interface _ARG_iface_name){0}) +#define LO_NULL(_ARG_iface_name) ((lo_interface _ARG_iface_name){}) /** * `LO_IS_NULL(iface_val)` returns whether `iface_val` is LO_NULL. |