Silence implicit-fallthrough warnings

Used [[fallthrough]]; to mark affected areas. Such keyword should be
available since C++11
This commit is contained in:
negativeExponent 2022-10-07 13:12:49 +08:00
parent 7c25d64d69
commit 0594fa2a2c
4 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -1352,6 +1352,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;

View File

@ -2250,7 +2250,8 @@ void CPUSoftwareInterrupt(int comment)
break;
case 0x2A:
BIOS_SndDriverJmpTableCopy();
// let it go, because we don't really emulate this function
// let it go, because we don't really emulate this function
[[fallthrough]];
default:
#ifdef GBA_LOGGING
if (systemVerbose & VERBOSE_SWI) {

View File

@ -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