From 8e580045cd423b6cfff0a2c30e53e32f675cf9e8 Mon Sep 17 00:00:00 2001 From: Herman Semenov Date: Thu, 11 Apr 2024 16:56:59 +0300 Subject: [PATCH] Fixed condition always false using unsigned int and logical AND 0 & 4 --- Common/Buffer.cpp | 2 +- Common/GPU/OpenGL/GLRenderManager.h | 1 - Core/Util/DisArm64.cpp | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Common/Buffer.cpp b/Common/Buffer.cpp index 25af9607d1..683c520500 100644 --- a/Common/Buffer.cpp +++ b/Common/Buffer.cpp @@ -111,7 +111,7 @@ void Buffer::Printf(const char *fmt, ...) { // Output was truncated. TODO: Do something. ERROR_LOG(IO, "Buffer::Printf truncated output"); } - if (retval < 0) { + if ((int)retval < 0) { ERROR_LOG(IO, "Buffer::Printf failed"); } va_end(vl); diff --git a/Common/GPU/OpenGL/GLRenderManager.h b/Common/GPU/OpenGL/GLRenderManager.h index b3230da67f..4c7e1a5509 100644 --- a/Common/GPU/OpenGL/GLRenderManager.h +++ b/Common/GPU/OpenGL/GLRenderManager.h @@ -421,7 +421,6 @@ public: // an init command, that's for sure. GLRInitStep &step = initSteps_.push_uninitialized(); step.stepType = GLRInitStepType::BUFFER_SUBDATA; - _dbg_assert_(offset >= 0); _dbg_assert_(offset <= buffer->size_ - size); step.buffer_subdata.buffer = buffer; step.buffer_subdata.offset = (int)offset; diff --git a/Core/Util/DisArm64.cpp b/Core/Util/DisArm64.cpp index 5fc2a6eba9..5b92a22346 100644 --- a/Core/Util/DisArm64.cpp +++ b/Core/Util/DisArm64.cpp @@ -916,8 +916,6 @@ static void FPandASIMD2(uint32_t w, uint64_t addr, Instruction *instr) { } else if (((w >> 10) & 0x3f) == 0x0 && opcode == 0) { char ir = sf ? 'x' : 'w'; char roundmode = "npmz"[(w >> 19) & 3]; - if (opcode & 0x4) - roundmode = 'a'; char fr = ((w >> 22) & 1) ? 'd' : 's'; snprintf(instr->text, sizeof(instr->text), "fcvt%cs %c%d, %c%d", roundmode, ir, Rd, fr, Rn); } else if ((opcode & 6) == 2) {