From dbd9a45f9d7ae9f70664635306dbd4b011116f6a Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Thu, 4 Jan 2024 00:26:02 +0100 Subject: Defined PRINTFLIKE() --- FICS/common.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'FICS') 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__))) -- cgit v1.2.3