Merge pull request #108 from negativeExponent/fix_implicit-fallthrough
Fix implicit fallthrough and other warnings
This commit is contained in:
commit
62671753a9
|
@ -218,6 +218,7 @@ void Gb_Apu::run_until_( blip_time_t end_time )
|
|||
case 6:
|
||||
// 128 Hz
|
||||
square1.clock_sweep();
|
||||
[[fallthrough]];
|
||||
case 0:
|
||||
case 4:
|
||||
// 256 Hz
|
||||
|
|
|
@ -1553,7 +1553,7 @@ void gbWriteMemory(uint16_t address, uint8_t value)
|
|||
}
|
||||
inBios = false;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
|
||||
// HDMA1
|
||||
case 0x51: {
|
||||
|
@ -1747,7 +1747,7 @@ void gbWriteMemory(uint16_t address, uint8_t value)
|
|||
gbMemory[0xff70] = register_SVBK = value;
|
||||
return;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
|
||||
case 0x75: {
|
||||
gbMemory[0xff75] = 0x8f | value;
|
||||
|
|
|
@ -1086,10 +1086,11 @@ int cheatsCheckKeys(uint32_t keys, uint32_t extended)
|
|||
break;
|
||||
case GSA_32_BIT_WRITE_IOREGS:
|
||||
if (cheatsList[i].address <= 0x3FF) {
|
||||
if (((cheatsList[i].address & 0x3FC) != 0x6) && ((cheatsList[i].address & 0x3FC) != 0x130))
|
||||
ioMem[cheatsList[i].address & 0x3FC] = (cheatsList[i].value & 0xFFFF);
|
||||
if ((((cheatsList[i].address & 0x3FC) + 2) != 0x6) && ((cheatsList[i].address & 0x3FC) + 2) != 0x130)
|
||||
ioMem[(cheatsList[i].address & 0x3FC) + 2] = ((cheatsList[i].value >> 16) & 0xFFFF);
|
||||
uint32_t cheat_addr = cheatsList[i].address & 0x3FC;
|
||||
if ((cheat_addr != 6) && (cheat_addr != 0x130))
|
||||
ioMem[cheat_addr] = (cheatsList[i].value & 0xFFFF);
|
||||
if (((cheat_addr + 2) != 0x6) && (cheat_addr + 2) != 0x130)
|
||||
ioMem[cheat_addr + 2] = ((cheatsList[i].value >> 16) & 0xFFFF);
|
||||
}
|
||||
break;
|
||||
case GSA_8_BIT_IF_TRUE3:
|
||||
|
@ -1352,6 +1353,7 @@ void cheatsDelete(int number, bool restore)
|
|||
} else {
|
||||
CPUWriteMemory(cheatsList[x].address, cheatsList[x].oldValue);
|
||||
}
|
||||
[[fallthrough]];
|
||||
case GSA_16_BIT_ROM_PATCH:
|
||||
if (cheatsList[x].status & 1) {
|
||||
cheatsList[x].status &= ~1;
|
||||
|
|
|
@ -2251,6 +2251,7 @@ void CPUSoftwareInterrupt(int comment)
|
|||
case 0x2A:
|
||||
BIOS_SndDriverJmpTableCopy();
|
||||
// let it go, because we don't really emulate this function
|
||||
[[fallthrough]];
|
||||
default:
|
||||
#ifdef GBA_LOGGING
|
||||
if (systemVerbose & VERBOSE_SWI) {
|
||||
|
|
|
@ -131,7 +131,7 @@ static inline uint32_t CPUReadMemory(uint32_t address)
|
|||
value = flashRead(address) * 0x01010101;
|
||||
break;
|
||||
}
|
||||
// default
|
||||
[[fallthrough]];
|
||||
default:
|
||||
unreadable:
|
||||
#ifdef GBA_LOGGING
|
||||
|
@ -281,7 +281,7 @@ static inline uint32_t CPUReadHalfWord(uint32_t address)
|
|||
value = flashRead(address) * 0x0101;
|
||||
break;
|
||||
}
|
||||
// default
|
||||
[[fallthrough]];
|
||||
default:
|
||||
unreadable:
|
||||
if (cpuDmaRunning|| ((reg[15].I - cpuDmaPC) == (armState ? 4 : 2))) {
|
||||
|
@ -407,7 +407,7 @@ static inline uint8_t CPUReadByte(uint32_t address)
|
|||
case 0x8500:
|
||||
return systemGetSensorY() >> 8;
|
||||
}
|
||||
// default
|
||||
[[fallthrough]];
|
||||
default:
|
||||
unreadable:
|
||||
#ifdef GBA_LOGGING
|
||||
|
|
|
@ -456,7 +456,7 @@ void BIOS_EReader_ScanCard(int swi_num)
|
|||
THUMB_PREFETCH
|
||||
} else if ((swi_num == 0xE3) || (swi_num == 0xE5)) //Dotcode data
|
||||
{
|
||||
if ((reg[0].I >= 0) && (reg[0].I <= 0x10)) {
|
||||
if (((int)reg[0].I >= 0) && (reg[0].I <= 0x10)) {
|
||||
if (decodestate == 0) {
|
||||
for (i = 0x17; i >= 0; i--) {
|
||||
if ((0x17 - i) < 8)
|
||||
|
|
Loading…
Reference in New Issue