From 82d689b4850b12c73e404e1ecd5e85394d4e44ef Mon Sep 17 00:00:00 2001 From: TuxSH <1922548+TuxSH@users.noreply.github.com> Date: Fri, 16 Jun 2023 21:28:08 +0200 Subject: [PATCH] Fix build issues Closes #1894 --- arm9/source/firm.c | 4 +++- sysmodules/loader/source/patcher.c | 2 +- sysmodules/pm/source/termination.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arm9/source/firm.c b/arm9/source/firm.c index c0b4f33..4bd15b3 100755 --- a/arm9/source/firm.c +++ b/arm9/source/firm.c @@ -151,7 +151,7 @@ static inline u32 loadFirmFromStorage(FirmwareType firmType) u32 loadNintendoFirm(FirmwareType *firmType, FirmwareSource nandType, bool loadFromStorage, bool isSafeMode) { - u32 firmVersion, + u32 firmVersion = 0xFFFFFFFF, firmSize; bool ctrNandError = isSdMode && !mountFs(false, false); @@ -228,6 +228,8 @@ u32 loadNintendoFirm(FirmwareType *firmType, FirmwareSource nandType, bool loadF case 2: firmVersion = 0x1F; break; + default: + break; } } } diff --git a/sysmodules/loader/source/patcher.c b/sysmodules/loader/source/patcher.c index 98815a1..ecefbbd 100644 --- a/sysmodules/loader/source/patcher.c +++ b/sysmodules/loader/source/patcher.c @@ -695,7 +695,7 @@ void patchCode(u64 progId, u16 progVer, u8 *code, u32 size, u32 textSize, u32 ro && CONFIG(PATCHVERSTRING)) { static const u16 pattern[] = u"Ve"; - static u16 *patch; + u16 *patch; u32 patchSize = 0, currentNand = BOOTCFG_NAND; diff --git a/sysmodules/pm/source/termination.c b/sysmodules/pm/source/termination.c index dd903bf..fb16a5c 100644 --- a/sysmodules/pm/source/termination.c +++ b/sysmodules/pm/source/termination.c @@ -145,7 +145,7 @@ static void TerminateProcessOrTitleAsync(void *argdata) ProcessData *process; bool notify = false; - u8 variation; + u8 variation = 0; if (args->timeout >= 0) { assertSuccess(svcClearEvent(g_manager.allNotifiedTerminationEvent));