diff options
author | Sadie Powell <sadie@witchery.services> | 2024-01-06 14:34:00 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-01-08 13:11:50 +0000 |
commit | a4dddfd5f121c9cc74e05e08a568c6a9febfd56f (patch) | |
tree | 5cb718582a9c9fc4d79a4a0833f3a4c8027cb821 /include/sysconf.h.cmake | |
parent | 7ddc865cdeb0be9eb929cbbefae1c92009683291 (diff) |
Mark format strings with the GNU printf attribute.
Diffstat (limited to 'include/sysconf.h.cmake')
-rw-r--r-- | include/sysconf.h.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sysconf.h.cmake b/include/sysconf.h.cmake index 61d998a78..35f876b5e 100644 --- a/include/sysconf.h.cmake +++ b/include/sysconf.h.cmake @@ -31,3 +31,9 @@ # endif # define sleep(x) Sleep(x * 1000) #endif + +#if defined __GNUC__ +# define ATTR_FORMAT(STRINGPOS, FIRSTPOS) __attribute__((format(printf, STRINGPOS, FIRSTPOS))) +#else +# define ATTR_FORMAT(STRINGPOS, FIRSTPOS) +#endif |