aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-01-04 00:26:02 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-01-04 00:26:02 +0100
commitdbd9a45f9d7ae9f70664635306dbd4b011116f6a (patch)
tree171a07a50d1620ae834b8c4098c06ce9b54ff293
parente8713b07f87ef967c16c5971c3d72daea506baa4 (diff)
Defined PRINTFLIKE()
-rw-r--r--FICS/common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/FICS/common.h b/FICS/common.h
index 14a10b2..4813359 100644
--- a/FICS/common.h
+++ b/FICS/common.h
@@ -41,6 +41,12 @@
#define ARRAY_SIZE(_a) (sizeof((_a)) / sizeof((_a)[0]))
+#ifdef __GNUC__
+#define PRINTFLIKE(arg_no) __attribute__((format(printf, arg_no, arg_no + 1)))
+#else
+#define PRINTFLIKE(arg_no)
+#endif
+
#ifdef DEBUG
#define ASSERT(expression) \
((void) ((expression)||_assert_error(__FILE__, __LINE__)))