summaryrefslogtreecommitdiffstats
path: root/src/zix/common.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-09-26 10:54:19 +0200
committerDavid Robillard <d@drobilla.net>2020-09-26 10:54:19 +0200
commita433992d150f22c2fdff2c13801a74b31b726b55 (patch)
tree43a8561600e702ae3469d681b7ec528b3b3caedd /src/zix/common.h
parent81e138633076c2d7ef7e1691845757208d02f478 (diff)
downloadsord-a433992d150f22c2fdff2c13801a74b31b726b55.tar.gz
sord-a433992d150f22c2fdff2c13801a74b31b726b55.tar.bz2
sord-a433992d150f22c2fdff2c13801a74b31b726b55.zip
Update zix
Diffstat (limited to 'src/zix/common.h')
-rw-r--r--src/zix/common.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/zix/common.h b/src/zix/common.h
index a59c033..3271858 100644
--- a/src/zix/common.h
+++ b/src/zix/common.h
@@ -17,6 +17,8 @@
#ifndef ZIX_COMMON_H
#define ZIX_COMMON_H
+#include <stdbool.h>
+
/**
@addtogroup zix
@{
@@ -48,14 +50,21 @@
#ifdef __cplusplus
extern "C" {
-#else
-# include <stdbool.h>
#endif
#ifdef __GNUC__
-#define ZIX_UNUSED __attribute__((__unused__))
+#define ZIX_LOG_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1)))
+#else
+#define ZIX_LOG_FUNC(fmt, arg1)
+#endif
+
+// Unused parameter macro to suppresses warnings and make it impossible to use
+#if defined(__cplusplus)
+# define ZIX_UNUSED(name)
+#elif defined(__GNUC__)
+# define ZIX_UNUSED(name) name##_unused __attribute__((__unused__))
#else
-#define ZIX_UNUSED
+# define ZIX_UNUSED(name) name
#endif
typedef enum {