Fix compiler warnings

This commit is contained in:
Maschell 2026-01-20 18:26:59 +01:00
parent 67a527010d
commit 958a1e72d0
5 changed files with 6 additions and 2 deletions

View File

@ -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__

View File

@ -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;

View File

@ -15,6 +15,7 @@
#include <mutex>
static void writeDataAndFlushIC(CThread *thread, void *arg) {
(void) thread;
auto *data = (PatchedFunctionData *) arg;
uint32_t replace_instruction = data->replaceWithInstruction;

View File

@ -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) {

View File

@ -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;