From 958a1e72d0c405fb6a4d0d0f4b8978851afff390 Mon Sep 17 00:00:00 2001 From: Maschell Date: Tue, 20 Jan 2026 18:26:59 +0100 Subject: [PATCH] Fix compiler warnings --- Makefile | 2 +- source/FunctionAddressProvider.cpp | 2 +- source/function_patcher.cpp | 1 + source/main.cpp | 2 ++ source/utils/CThread.h | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9401ba4..74580fd 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ INCLUDES := source #------------------------------------------------------------------------------- # options for code generation #------------------------------------------------------------------------------- -CFLAGS := -Wall -Os -ffunction-sections\ +CFLAGS := -Wall -Wextra -Werror -Os -ffunction-sections\ $(MACHDEP) CFLAGS += $(INCLUDE) -D__WIIU__ -D__WUT__ diff --git a/source/FunctionAddressProvider.cpp b/source/FunctionAddressProvider.cpp index 952f3af..3e7becb 100644 --- a/source/FunctionAddressProvider.cpp +++ b/source/FunctionAddressProvider.cpp @@ -15,7 +15,7 @@ uint32_t FunctionAddressProvider::getEffectiveAddressOfFunction(function_replace err = OSDynLoad_IsModuleLoaded((char *) rplHandle.rplname, &rplHandle.handle); } if (err != OS_DYNLOAD_OK || !rplHandle.handle) { - DEBUG_FUNCTION_LINE_VERBOSE("%s is not loaded yet", rplHandle.rplname, err, rplHandle.handle); + DEBUG_FUNCTION_LINE_VERBOSE("%s is not loaded yet. Err %d for handle %p", rplHandle.rplname, err, rplHandle.handle); return 0; } rpl_handle = rplHandle.handle; diff --git a/source/function_patcher.cpp b/source/function_patcher.cpp index 66d61b0..69892d6 100644 --- a/source/function_patcher.cpp +++ b/source/function_patcher.cpp @@ -15,6 +15,7 @@ #include static void writeDataAndFlushIC(CThread *thread, void *arg) { + (void) thread; auto *data = (PatchedFunctionData *) arg; uint32_t replace_instruction = data->replaceWithInstruction; diff --git a/source/main.cpp b/source/main.cpp index 15063ac..3349a0c 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -130,6 +130,8 @@ void notify_callback(OSDynLoad_Module module, void *userContext, OSDynLoad_NotifyReason reason, OSDynLoad_NotifyData *infos) { + (void) userContext; + (void) infos; if (reason == OS_DYNLOAD_NOTIFY_LOADED) { std::lock_guard lock(gPatchedFunctionsMutex); for (auto &cur : gPatchedFunctions) { diff --git a/source/utils/CThread.h b/source/utils/CThread.h index 454067a..a465289 100644 --- a/source/utils/CThread.h +++ b/source/utils/CThread.h @@ -151,6 +151,7 @@ public: private: static int32_t threadCallback(int32_t argc, void *arg) { + (void) argc; //! After call to start() continue with the internal function ((CThread *) arg)->executeThread(); return 0;