From 8606b2ea5a9a10260f88ce07cca2ab307c3b300f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 8 Oct 2021 19:09:26 +0200 Subject: [PATCH] - fixed warnings in Blood. --- source/games/blood/src/barf.cpp | 2 +- source/games/blood/src/loadsave.cpp | 4 ++-- source/games/blood/src/nnexts.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/games/blood/src/barf.cpp b/source/games/blood/src/barf.cpp index f0fba4fbb..a707d315d 100644 --- a/source/games/blood/src/barf.cpp +++ b/source/games/blood/src/barf.cpp @@ -465,7 +465,7 @@ uint8_t RFS::GetNextTag() break; } - if (eax == 0 && strlen(tags[i]._value) == ebp) + if (eax == 0 && (int)strlen(tags[i]._value) == ebp) { scriptBuffer[ebp] = 0; return tags[i]._index; diff --git a/source/games/blood/src/loadsave.cpp b/source/games/blood/src/loadsave.cpp index 9bd865ef2..a3af6108f 100644 --- a/source/games/blood/src/loadsave.cpp +++ b/source/games/blood/src/loadsave.cpp @@ -394,7 +394,7 @@ static AISTATE* allAIStates[] = FSerializer& Serialize(FSerializer& arc, const char* keyname, AISTATE*& w, AISTATE** def) { - int i = 0; + unsigned i = 0; if (arc.isWriting()) { if (def && w == *def) return arc; @@ -411,7 +411,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, AISTATE*& w, AISTA else { arc(keyname, i); - if (i >= 0 && i < countof(allAIStates)) + if (i < countof(allAIStates)) { w = allAIStates[i]; } diff --git a/source/games/blood/src/nnexts.cpp b/source/games/blood/src/nnexts.cpp index 6d4f26133..336c69189 100644 --- a/source/games/blood/src/nnexts.cpp +++ b/source/games/blood/src/nnexts.cpp @@ -3287,7 +3287,7 @@ void condError(XSPRITE* pXCond, const char* pzFormat, ...) { break; } - snprintf(buffer, 512, "\n\n%s CONDITION RX: %d, TX: %d, SPRITE: #%d RETURNS:\n", condType.GetChars(), pXCond->rxID, pXCond->txID, pXCond->reference); + snprintf(buffer, 256, "\n\n%s CONDITION RX: %d, TX: %d, SPRITE: #%d RETURNS:\n", condType.GetChars(), pXCond->rxID, pXCond->txID, pXCond->reference); va_list args; va_start(args, pzFormat); vsnprintf(buffer2, 512, pzFormat, args);