diff options
| author | Craig Barnes <craigbarnes@protonmail.com> | 2020-08-07 19:42:34 +0000 |
|---|---|---|
| committer | Craig Barnes <craigbarnes@protonmail.com> | 2020-08-07 19:42:34 +0000 |
| commit | 7eb70a453b4ea797d9e85017c6deab6a7bc903a6 (patch) | |
| tree | 265282027801e799b9a4a3afba074c868689b49e /macros.h | |
| parent | Merge branch 'syslog' into master (diff) | |
Replace GCC "unused" and "format" attributes with portable macros
Diffstat (limited to 'macros.h')
| -rw-r--r-- | macros.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -20,6 +20,12 @@ #define HAS_BUILTIN(x) 0 #endif +#if GNUC_AT_LEAST(3, 0) || HAS_ATTRIBUTE(unused) || defined(__TINYC__) + #define UNUSED __attribute__((__unused__)) +#else + #define UNUSED +#endif + #if GNUC_AT_LEAST(3, 0) || HAS_ATTRIBUTE(malloc) #define MALLOC __attribute__((__malloc__)) #else |
