From 443b7ae602a1374295326b2788c6c86c4e2780ad Mon Sep 17 00:00:00 2001 From: coco875 Date: Sat, 21 Dec 2024 23:49:14 +0100 Subject: [PATCH] fix clang error --- src/audio/audio_load.c | 2 +- src/audio/audio_thread.c | 4 ++-- src/port/Engine.cpp | 4 ++-- src/sys/sys_main.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/audio/audio_load.c b/src/audio/audio_load.c index 3ed697d3..e8262122 100644 --- a/src/audio/audio_load.c +++ b/src/audio/audio_load.c @@ -1279,7 +1279,7 @@ s32 AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, uintptr_t fontDataAddr, gNumUsedSamples = 0; AudioLoad_RelocateFont(fontId, fontDataAddr, relocData); - return; + return 0; size = 0; diff --git a/src/audio/audio_thread.c b/src/audio/audio_thread.c index f38e8935..193e43e7 100644 --- a/src/audio/audio_thread.c +++ b/src/audio/audio_thread.c @@ -65,11 +65,11 @@ void AudioThread_CreateNextAudioBuffer(s16* samples, u32 num_samples) { osSendMesg8(gAudioResetQueue, gAudioSpecId, OS_MESG_NOBLOCK); } gWaitingAudioTask = NULL; - return NULL; + return; } if (gAudioResetTimer > 16) { - return NULL; + return; } if (gAudioResetTimer != 0) { gAudioResetTimer++; diff --git a/src/port/Engine.cpp b/src/port/Engine.cpp index 15b0f17d..66a6aab4 100644 --- a/src/port/Engine.cpp +++ b/src/port/Engine.cpp @@ -432,11 +432,11 @@ extern "C" uint8_t GameEngine_OTRSigCheck(const char* data) { return strncmp(data, sOtrSignature, strlen(sOtrSignature)) == 0; } -extern "C" float __cosf(float angle) { +extern "C" float __cosf(float angle) throw() { return cosf(angle); } -extern "C" float __sinf(float angle) { +extern "C" float __sinf(float angle) throw() { return sinf(angle); } diff --git a/src/sys/sys_main.c b/src/sys/sys_main.c index 0d50b0e9..3fa52ae9 100644 --- a/src/sys/sys_main.c +++ b/src/sys/sys_main.c @@ -21,8 +21,8 @@ OSMesgQueue gSerialEventQueue; OSMesg sSerialEventBuff[1]; OSMesgQueue gMainThreadMesgQueue; OSMesg sMainThreadMsgBuff[32]; -OSMesgQueue gTaskMesgQueue; -OSMesg sTaskMsgBuff[16]; +OSMesgQueue gTaskMesgQueue = {0}; +OSMesg sTaskMsgBuff[16] = {0}; OSMesgQueue gAudioVImesgQueue; OSMesg sAudioVImsgBuff[1]; OSMesgQueue gAudioTaskMesgQueue;