Fix warnings

This commit is contained in:
PeachyPeachSM64 2025-09-14 14:19:58 +02:00
parent 1c71449ed2
commit 2e98dd5a5e
4 changed files with 3 additions and 6 deletions

View file

@ -503,7 +503,6 @@ static void level_cmd_23(void) {
static void level_cmd_init_mario(void) { static void level_cmd_init_mario(void) {
u32 behaviorArg = CMD_GET(u32, 4); u32 behaviorArg = CMD_GET(u32, 4);
behaviorArg = behaviorArg;
void* behaviorScript = CMD_GET(void*, 8); void* behaviorScript = CMD_GET(void*, 8);
u16 slot = CMD_GET(u8, 3); u16 slot = CMD_GET(u8, 3);
struct GraphNode* unk18 = dynos_model_get_geo(slot); struct GraphNode* unk18 = dynos_model_get_geo(slot);
@ -923,7 +922,7 @@ static void level_cmd_cleardemoptr(void)
// coop // 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); *param = CMD_GET(uintptr_t, offset);
if (luaParams & luaParamFlag) { if (luaParams & luaParamFlag) {
if (gLevelScriptModIndex == -1) { 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) \ #define get_lua_param(name, type, flag) \
uintptr_t name##Param; \ 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; \ sCurrentCmd = CMD_NEXT; \
return; \ return; \
} \ } \

View file

@ -156,7 +156,6 @@ static void smlua_sync_table_call_hook(int syncTableIndex, int keyIndex, int pre
} }
gLuaActiveMod = prevActiveMod; gLuaActiveMod = prevActiveMod;
prevActiveModFile = prevActiveModFile;
} }
lua_pop(L, 1); // pop _hook_on_changed's value 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"); LOG_LUA_LINE("Error: tried to alter sync table with an invalid key");
return false; return false;
} }
lntKey = lntKey;
//////////////// ////////////////

View file

@ -1,6 +1,7 @@
#ifndef SMLUA_UTILS_H #ifndef SMLUA_UTILS_H
#define SMLUA_UTILS_H #define SMLUA_UTILS_H
#include "smlua.h"
#include "src/pc/network/packets/packet.h" #include "src/pc/network/packets/packet.h"
extern u8 gSmLuaConvertSuccess; extern u8 gSmLuaConvertSuccess;

View file

@ -15,7 +15,6 @@ void print_sync_object_table(void) {
if (so->o->oSyncID != so->id) { if (so->o->oSyncID != so->id) {
LOG_INFO("^^^^^^^^^^^^^^^^^^^^^ %u != %u", so->o->oSyncID, so->id); LOG_INFO("^^^^^^^^^^^^^^^^^^^^^ %u != %u", so->o->oSyncID, so->id);
} }
behaviorId = behaviorId; // suppress warning
} }
LOG_INFO(" "); LOG_INFO(" ");
} }