mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
Replace GCC "unused" and "format" attributes with portable macros
This commit is contained in:
parent
f952d5a305
commit
7eb70a453b
7 changed files with 18 additions and 10 deletions
6
macros.h
6
macros.h
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue