summaryrefslogtreecommitdiffstats
path: root/zix
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-13 17:25:43 +0200
committerDavid Robillard <d@drobilla.net>2020-08-13 17:25:43 +0200
commitac426323570113bb13605b20d47273c8c23e3fe3 (patch)
tree0fac226b0aa526995f1ea5a2d444a23fdbfc5405 /zix
parent5139ab9b1ad4d58609f078f24bd2d013b9905cdb (diff)
downloadzix-ac426323570113bb13605b20d47273c8c23e3fe3.tar.gz
zix-ac426323570113bb13605b20d47273c8c23e3fe3.tar.bz2
zix-ac426323570113bb13605b20d47273c8c23e3fe3.zip
Add format attributes
Diffstat (limited to 'zix')
-rw-r--r--zix/common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/zix/common.h b/zix/common.h
index f0737eb..e427885 100644
--- a/zix/common.h
+++ b/zix/common.h
@@ -52,6 +52,12 @@ extern "C" {
# include <stdbool.h>
#endif
+#ifdef __GNUC__
+#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)