Merge pull request #19032 from GermanAizek/fix-always-false-true

Fixed conditions always false using unsigned type and logical AND 0x0 & 0x4
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2024-04-13 11:28:45 +02:00
commit aec3fa99e5
3 files changed
+1 -4

No files matched your search

+1 -1
View File
@@ -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);
-1
View File
@@ -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;
-2
View File
@@ -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) {