Correct C23 Checks (#2144)

This commit is contained in:
Kurausukun
2025-05-19 10:43:06 -04:00
committed by GitHub
parent 59d315734d
commit bd0a02c456
5 changed files with 9 additions and 9 deletions

View File

@@ -115,7 +115,7 @@ INCLUDE_SCANINC_ARGS := $(INCLUDE_DIRS:%=-I %)
O_LEVEL ?= 2
CPPFLAGS := $(INCLUDE_CPP_ARGS) -Wno-trigraphs -DMODERN=$(MODERN)
ifeq ($(MODERN),0)
CPPFLAGS += -I tools/agbcc/include -I tools/agbcc -nostdinc -undef
CPPFLAGS += -I tools/agbcc/include -I tools/agbcc -nostdinc -undef -std=gnu89
CC1 := tools/agbcc/bin/agbcc$(EXE)
override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O$(O_LEVEL) -fhex-asm -g
LIBPATH := -L ../../tools/agbcc/lib

View File

@@ -170,7 +170,7 @@ struct SoundChannel
struct MusicPlayerInfo;
#if !MODERN
#if __STDC_VERSION__ < 202311L
typedef void (*MPlayFunc)();
#else
typedef void (*MPlayFunc)(...);

View File

@@ -316,7 +316,7 @@ struct STWIStatus
u8 recoveryCount;
u8 unk_16;
u8 unk_17;
#if !MODERN
#if __STDC_VERSION__ < 202311L
void (*callbackM)();
#else
void (*callbackM)(...);

View File

@@ -7,7 +7,7 @@ static u16 handshake_wait(u16 slot);
static void STWI_set_timer_in_RAM(u8 count);
static void STWI_stop_timer_in_RAM(void);
static void STWI_init_slave(void);
#if !MODERN
#if __STDC_VERSION__ < 202311L
static void Callback_Dummy_M(int reqCommandId, int error, void (*callbackM)());
#else
static void Callback_Dummy_M(int reqCommandId, int error, void (*callbackM)(...));
@@ -139,7 +139,7 @@ static void sio32intr_clock_master(void)
}
gSTWIStatus->sending = 0;
if (gSTWIStatus->callbackM != NULL)
#if !MODERN
#if __STDC_VERSION__ < 202311L
Callback_Dummy_M(gSTWIStatus->reqActiveCommand, gSTWIStatus->error, gSTWIStatus->callbackM);
#else
Callback_Dummy_M(gSTWIStatus->reqActiveCommand, gSTWIStatus->error, (void (*)(...))gSTWIStatus->callbackM);
@@ -396,7 +396,7 @@ static void STWI_init_slave(void)
}
NAKED
#if !MODERN
#if __STDC_VERSION__ < 202311L
static void Callback_Dummy_M(int reqCommandId, int error, void (*callbackM)())
#else
static void Callback_Dummy_M(int reqCommandId, int error, void (*callbackM)(...))

View File

@@ -283,7 +283,7 @@ void MPlayExtender(struct CgbChannel *cgbChans)
soundInfo->ident++;
#if !MODERN
#if __STDC_VERSION__ < 202311L
gMPlayJumpTable[8] = ply_memacc;
gMPlayJumpTable[17] = ply_lfos;
gMPlayJumpTable[19] = ply_mod;
@@ -332,7 +332,7 @@ void MusicPlayerJumpTableCopy(void)
void ClearChain(void *x)
{
#if !MODERN
#if __STDC_VERSION__ < 202311L
void (*func)(void *) = *(&gMPlayJumpTable[34]);
#else
void (*func)(...) = *(&gMPlayJumpTable[34]);
@@ -342,7 +342,7 @@ void ClearChain(void *x)
void Clear64byte(void *x)
{
#if !MODERN
#if __STDC_VERSION__ < 202311L
void (*func)(void *) = *(&gMPlayJumpTable[35]);
#else
void (*func)(...) = *(&gMPlayJumpTable[35]);