diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-01-04 00:26:02 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-01-04 00:26:02 +0100 |
commit | dbd9a45f9d7ae9f70664635306dbd4b011116f6a (patch) | |
tree | 171a07a50d1620ae834b8c4098c06ce9b54ff293 | |
parent | e8713b07f87ef967c16c5971c3d72daea506baa4 (diff) |
Defined PRINTFLIKE()
-rw-r--r-- | FICS/common.h | 6 |
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__))) |