mirror of
https://github.com/wiiu-env/FunctionPatcherModule.git
synced 2026-04-24 06:47:45 -05:00
Fix compiler warnings
This commit is contained in:
parent
ce20d6718c
commit
aa69d33b7c
2
Makefile
2
Makefile
|
|
@ -28,7 +28,7 @@ INCLUDES := source
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# options for code generation
|
# options for code generation
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
CFLAGS := -Wall -Os -ffunction-sections\
|
CFLAGS := -Wall -Wextra -Werror -Os -ffunction-sections\
|
||||||
$(MACHDEP)
|
$(MACHDEP)
|
||||||
|
|
||||||
CFLAGS += $(INCLUDE) -D__WIIU__ -D__WUT__
|
CFLAGS += $(INCLUDE) -D__WIIU__ -D__WUT__
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ uint32_t FunctionAddressProvider::getEffectiveAddressOfFunction(function_replace
|
||||||
err = OSDynLoad_IsModuleLoaded((char *) rplHandle.rplname, &rplHandle.handle);
|
err = OSDynLoad_IsModuleLoaded((char *) rplHandle.rplname, &rplHandle.handle);
|
||||||
}
|
}
|
||||||
if (err != OS_DYNLOAD_OK || !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;
|
return 0;
|
||||||
}
|
}
|
||||||
rpl_handle = rplHandle.handle;
|
rpl_handle = rplHandle.handle;
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
||||||
static void writeDataAndFlushIC(CThread *thread, void *arg) {
|
static void writeDataAndFlushIC(CThread *thread, void *arg) {
|
||||||
|
(void) thread;
|
||||||
auto *data = (PatchedFunctionData *) arg;
|
auto *data = (PatchedFunctionData *) arg;
|
||||||
|
|
||||||
uint32_t replace_instruction = data->replaceWithInstruction;
|
uint32_t replace_instruction = data->replaceWithInstruction;
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,8 @@ void notify_callback(OSDynLoad_Module module,
|
||||||
void *userContext,
|
void *userContext,
|
||||||
OSDynLoad_NotifyReason reason,
|
OSDynLoad_NotifyReason reason,
|
||||||
OSDynLoad_NotifyData *infos) {
|
OSDynLoad_NotifyData *infos) {
|
||||||
|
(void) userContext;
|
||||||
|
(void) infos;
|
||||||
if (reason == OS_DYNLOAD_NOTIFY_LOADED) {
|
if (reason == OS_DYNLOAD_NOTIFY_LOADED) {
|
||||||
std::lock_guard lock(gPatchedFunctionsMutex);
|
std::lock_guard lock(gPatchedFunctionsMutex);
|
||||||
for (auto &cur : gPatchedFunctions) {
|
for (auto &cur : gPatchedFunctions) {
|
||||||
|
|
|
||||||
|
|
@ -151,6 +151,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static int32_t threadCallback(int32_t argc, void *arg) {
|
static int32_t threadCallback(int32_t argc, void *arg) {
|
||||||
|
(void) argc;
|
||||||
//! After call to start() continue with the internal function
|
//! After call to start() continue with the internal function
|
||||||
((CThread *) arg)->executeThread();
|
((CThread *) arg)->executeThread();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user