summaryrefslogtreecommitdiffstats
path: root/src/zix/common.h
diff options
context:
space:
mode:
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 {