From 2e98dd5a5e9f074ea0ae5f1ab2ee4dc4e6efd6dc Mon Sep 17 00:00:00 2001 From: PeachyPeachSM64 <72323920+PeachyPeachSM64@users.noreply.github.com> Date: Sun, 14 Sep 2025 14:19:58 +0200 Subject: [PATCH] Fix warnings --- src/engine/level_script.c | 5 ++--- src/pc/lua/smlua_sync_table.c | 2 -- src/pc/lua/smlua_utils.h | 1 + src/pc/network/packets/packet_debug_sync.c | 1 - 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/engine/level_script.c b/src/engine/level_script.c index 9f739ea69..3c71e3d75 100644 --- a/src/engine/level_script.c +++ b/src/engine/level_script.c @@ -503,7 +503,6 @@ static void level_cmd_23(void) { static void level_cmd_init_mario(void) { u32 behaviorArg = CMD_GET(u32, 4); - behaviorArg = behaviorArg; void* behaviorScript = CMD_GET(void*, 8); u16 slot = CMD_GET(u8, 3); struct GraphNode* unk18 = dynos_model_get_geo(slot); @@ -923,7 +922,7 @@ static void level_cmd_cleardemoptr(void) // coop // -static bool find_lua_param(uintptr_t *param, u32 offset, u32 luaParams, u32 luaParamFlag, const char *paramType) { +static bool find_lua_param(uintptr_t *param, u32 offset, u32 luaParams, u32 luaParamFlag) { *param = CMD_GET(uintptr_t, offset); if (luaParams & luaParamFlag) { if (gLevelScriptModIndex == -1) { @@ -950,7 +949,7 @@ static bool find_lua_param(uintptr_t *param, u32 offset, u32 luaParams, u32 luaP #define get_lua_param(name, type, flag) \ uintptr_t name##Param; \ - if (!find_lua_param(&name##Param, flag##_OFFSET(cmdType), luaParams, flag, #name)) { \ + if (!find_lua_param(&name##Param, flag##_OFFSET(cmdType), luaParams, flag)) { \ sCurrentCmd = CMD_NEXT; \ return; \ } \ diff --git a/src/pc/lua/smlua_sync_table.c b/src/pc/lua/smlua_sync_table.c index 9fb2ec293..766b35cd9 100644 --- a/src/pc/lua/smlua_sync_table.c +++ b/src/pc/lua/smlua_sync_table.c @@ -156,7 +156,6 @@ static void smlua_sync_table_call_hook(int syncTableIndex, int keyIndex, int pre } gLuaActiveMod = prevActiveMod; - prevActiveModFile = prevActiveModFile; } lua_pop(L, 1); // pop _hook_on_changed's value @@ -186,7 +185,6 @@ static bool smlua_sync_table_send_field(u8 toLocalIndex, int stackIndex, bool al LOG_LUA_LINE("Error: tried to alter sync table with an invalid key"); return false; } - lntKey = lntKey; //////////////// diff --git a/src/pc/lua/smlua_utils.h b/src/pc/lua/smlua_utils.h index f64286392..25a76c81b 100644 --- a/src/pc/lua/smlua_utils.h +++ b/src/pc/lua/smlua_utils.h @@ -1,6 +1,7 @@ #ifndef SMLUA_UTILS_H #define SMLUA_UTILS_H +#include "smlua.h" #include "src/pc/network/packets/packet.h" extern u8 gSmLuaConvertSuccess; diff --git a/src/pc/network/packets/packet_debug_sync.c b/src/pc/network/packets/packet_debug_sync.c index b5d33e6d6..a0ff7d026 100644 --- a/src/pc/network/packets/packet_debug_sync.c +++ b/src/pc/network/packets/packet_debug_sync.c @@ -15,7 +15,6 @@ void print_sync_object_table(void) { if (so->o->oSyncID != so->id) { LOG_INFO("^^^^^^^^^^^^^^^^^^^^^ %u != %u", so->o->oSyncID, so->id); } - behaviorId = behaviorId; // suppress warning } LOG_INFO(" "); }