From 5bc8d51a9eea2b3dbd7530a4858f613390ffef29 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Wed, 26 Feb 2020 14:28:11 +0100 Subject: [PATCH] Ignore unused arguments in a more standard way --- include/helpers.h | 1 - src/asm/globlex.c | 3 ++- src/asm/symbol.c | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/helpers.h b/include/helpers.h index d34c7b62..e6ad6d5a 100644 --- a/include/helpers.h +++ b/include/helpers.h @@ -14,7 +14,6 @@ #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 */ diff --git a/src/asm/globlex.c b/src/asm/globlex.c index 6ce08032..768779c3 100644 --- a/src/asm/globlex.c +++ b/src/asm/globlex.c @@ -318,8 +318,9 @@ uint32_t PutMacroArg(char *src, uint32_t size) return 0; } -uint32_t PutUniqueArg(unused_ char *src, uint32_t size) +uint32_t PutUniqueArg(char *src, uint32_t size) { + (void)src; char *s; yyskipbytes(size); diff --git a/src/asm/symbol.c b/src/asm/symbol.c index c7f187fc..d6db6e61 100644 --- a/src/asm/symbol.c +++ b/src/asm/symbol.c @@ -49,8 +49,9 @@ static char SavedMINUTE[3]; static char SavedSECOND[3]; static bool exportall; -static int32_t Callback_NARG(unused_ struct sSymbol const *sym) +static int32_t Callback_NARG(struct sSymbol const *self) { + (void)self; uint32_t i = 0; while (currentmacroargs[i] && i < MAXMACROARGS) @@ -59,8 +60,9 @@ static int32_t Callback_NARG(unused_ struct sSymbol const *sym) return i; } -static int32_t Callback__LINE__(unused_ struct sSymbol const *sym) +static int32_t Callback__LINE__(struct sSymbol const *self) { + (void)self; return nLineNo; }