mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Ignore unused arguments in a more standard way
This commit is contained in:
@@ -14,7 +14,6 @@
|
|||||||
#define format_(archetype, str_index, first_arg) \
|
#define format_(archetype, str_index, first_arg) \
|
||||||
__attribute__ ((format (archetype, str_index, first_arg)))
|
__attribute__ ((format (archetype, str_index, first_arg)))
|
||||||
#define noreturn_ __attribute__ ((noreturn))
|
#define noreturn_ __attribute__ ((noreturn))
|
||||||
#define unused_ __attribute__ ((unused))
|
|
||||||
#define trap_ __builtin_trap()
|
#define trap_ __builtin_trap()
|
||||||
#else
|
#else
|
||||||
/* Unsupported, but no need to throw a fit */
|
/* Unsupported, but no need to throw a fit */
|
||||||
|
|||||||
@@ -318,8 +318,9 @@ uint32_t PutMacroArg(char *src, uint32_t size)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t PutUniqueArg(unused_ char *src, uint32_t size)
|
uint32_t PutUniqueArg(char *src, uint32_t size)
|
||||||
{
|
{
|
||||||
|
(void)src;
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
yyskipbytes(size);
|
yyskipbytes(size);
|
||||||
|
|||||||
@@ -49,8 +49,9 @@ static char SavedMINUTE[3];
|
|||||||
static char SavedSECOND[3];
|
static char SavedSECOND[3];
|
||||||
static bool exportall;
|
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;
|
uint32_t i = 0;
|
||||||
|
|
||||||
while (currentmacroargs[i] && i < MAXMACROARGS)
|
while (currentmacroargs[i] && i < MAXMACROARGS)
|
||||||
@@ -59,8 +60,9 @@ static int32_t Callback_NARG(unused_ struct sSymbol const *sym)
|
|||||||
return i;
|
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;
|
return nLineNo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user