Add string format checking to err.h functions

And fix all problems this detected... oops
This commit is contained in:
ISSOtm
2020-02-24 16:58:40 +01:00
parent 702075eba6
commit dac13ba4bb
7 changed files with 22 additions and 17 deletions

View File

@@ -11,11 +11,14 @@
#ifdef __GNUC__
/* GCC or compatible */
#define format_(archetype, str_index, first_arg) \
__attribute__ ((format (archetype, str_index, first_arg)))
#define noreturn_ __attribute__ ((noreturn))
#define unused_ __attribute__ ((unused))
#define trap_ __builtin_trap()
#else
/* Unsupported, but no need to throw a fit */
#define format_(archetype, str_index, first_arg)
#define noreturn_
#define unused_
#define trap_