From 2dde74b4b653ab657a536f9dd952f4613390457a Mon Sep 17 00:00:00 2001 From: MysterD Date: Tue, 16 May 2023 22:17:43 -0700 Subject: [PATCH] Fix warnings --- src/game/memory.c | 2 -- src/pc/lua/utils/smlua_model_utils.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/game/memory.c b/src/game/memory.c index ce93dd86e..497432064 100644 --- a/src/game/memory.c +++ b/src/game/memory.c @@ -62,14 +62,12 @@ bool dynamic_pool_contains(struct DynamicPool *pool, void* ptr) { if (!pool || !ptr) { return false; } struct DynamicPoolNode* node = pool->tail; - struct DynamicPoolNode* next = node; while (node) { struct DynamicPoolNode* prev = node->prev; if (node->ptr == ptr) { return true; } - next = node; node = prev; } return false; diff --git a/src/pc/lua/utils/smlua_model_utils.c b/src/pc/lua/utils/smlua_model_utils.c index 03be005bd..794bf5ade 100644 --- a/src/pc/lua/utils/smlua_model_utils.c +++ b/src/pc/lua/utils/smlua_model_utils.c @@ -478,7 +478,7 @@ void smlua_model_util_store_in_slot(u32 slot, const char* name) { } u16 smlua_model_util_load(enum ModelExtendedId extId) { - if (extId >= E_MODEL_MAX + sCustomModelsCount) { extId = E_MODEL_ERROR_MODEL; } + if ((u32)extId >= (u32)E_MODEL_MAX + (u32)sCustomModelsCount) { extId = E_MODEL_ERROR_MODEL; } struct ModelUtilsInfo* info = (extId < E_MODEL_MAX) ? &sModels[extId]