summaryrefslogtreecommitdiff
path: root/libmisc/include
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-12 14:26:21 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-12 14:26:21 -0600
commit811d9700e1414dae3357361b3ca565f673f63b08 (patch)
treece628075a2ae59d5362d2662465c918f57e81607 /libmisc/include
parentcd5e55ebb7d5a51c0a8bd62137ab75a0f6ff1356 (diff)
parentb4a081932338f65aa87aeba5008463feb0a78519 (diff)
Merge branch 'lukeshu/misc'
Diffstat (limited to 'libmisc/include')
-rw-r--r--libmisc/include/libmisc/macro.h6
-rw-r--r--libmisc/include/libmisc/obj.h2
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.