magic.h: add macro __unused__

__attribute__((unused))

use like:

void myFunc(int arg0, __unused__(arg1)) { ... }
This commit is contained in:
Darryl L. Miles 2024-10-04 11:19:10 +01:00
parent bf96348502
commit fc02f57d73
1 changed files with 2 additions and 0 deletions

View File

@ -173,9 +173,11 @@ extern char AbortMessage[];
#if defined(__GNUC__) || defined(__clang__)
#define ATTR_FORMAT_PRINTF_1 __attribute__((format (printf,1,2)))
#define ATTR_FORMAT_PRINTF_2 __attribute__((format (printf,2,3)))
#define __unused__(x) x __attribute__((unused))
#else
#define ATTR_FORMAT_PRINTF_1 /* */
#define ATTR_FORMAT_PRINTF_2 /* */
#define __unused__(x) x
#endif
/* ---------------- Start of Machine Configuration Section ----------------- */