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:
|
case 6:
|
||||||
// 128 Hz
|
// 128 Hz
|
||||||
square1.clock_sweep();
|
square1.clock_sweep();
|
||||||
|
[[fallthrough]];
|
||||||
case 0:
|
case 0:
|
||||||
case 4:
|
case 4:
|
||||||
// 256 Hz
|
// 256 Hz
|
||||||
|
|
|
@ -1553,7 +1553,7 @@ void gbWriteMemory(uint16_t address, uint8_t value)
|
||||||
}
|
}
|
||||||
inBios = false;
|
inBios = false;
|
||||||
}
|
}
|
||||||
}
|
} break;
|
||||||
|
|
||||||
// HDMA1
|
// HDMA1
|
||||||
case 0x51: {
|
case 0x51: {
|
||||||
|
@ -1747,7 +1747,7 @@ void gbWriteMemory(uint16_t address, uint8_t value)
|
||||||
gbMemory[0xff70] = register_SVBK = value;
|
gbMemory[0xff70] = register_SVBK = value;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
} break;
|
||||||
|
|
||||||
case 0x75: {
|
case 0x75: {
|
||||||
gbMemory[0xff75] = 0x8f | value;
|
gbMemory[0xff75] = 0x8f | value;
|
||||||
|
|
|
@ -1086,10 +1086,11 @@ int cheatsCheckKeys(uint32_t keys, uint32_t extended)
|
||||||
break;
|
break;
|
||||||
case GSA_32_BIT_WRITE_IOREGS:
|
case GSA_32_BIT_WRITE_IOREGS:
|
||||||
if (cheatsList[i].address <= 0x3FF) {
|
if (cheatsList[i].address <= 0x3FF) {
|
||||||
if (((cheatsList[i].address & 0x3FC) != 0x6) && ((cheatsList[i].address & 0x3FC) != 0x130))
|
uint32_t cheat_addr = cheatsList[i].address & 0x3FC;
|
||||||
ioMem[cheatsList[i].address & 0x3FC] = (cheatsList[i].value & 0xFFFF);
|
if ((cheat_addr != 6) && (cheat_addr != 0x130))
|
||||||
if ((((cheatsList[i].address & 0x3FC) + 2) != 0x6) && ((cheatsList[i].address & 0x3FC) + 2) != 0x130)
|
ioMem[cheat_addr] = (cheatsList[i].value & 0xFFFF);
|
||||||
ioMem[(cheatsList[i].address & 0x3FC) + 2] = ((cheatsList[i].value >> 16) & 0xFFFF);
|
if (((cheat_addr + 2) != 0x6) && (cheat_addr + 2) != 0x130)
|
||||||
|
ioMem[cheat_addr + 2] = ((cheatsList[i].value >> 16) & 0xFFFF);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GSA_8_BIT_IF_TRUE3:
|
case GSA_8_BIT_IF_TRUE3:
|
||||||
|
@ -1352,6 +1353,7 @@ void cheatsDelete(int number, bool restore)
|
||||||
} else {
|
} else {
|
||||||
CPUWriteMemory(cheatsList[x].address, cheatsList[x].oldValue);
|
CPUWriteMemory(cheatsList[x].address, cheatsList[x].oldValue);
|
||||||
}
|
}
|
||||||
|
[[fallthrough]];
|
||||||
case GSA_16_BIT_ROM_PATCH:
|
case GSA_16_BIT_ROM_PATCH:
|
||||||
if (cheatsList[x].status & 1) {
|
if (cheatsList[x].status & 1) {
|
||||||
cheatsList[x].status &= ~1;
|
cheatsList[x].status &= ~1;
|
||||||
|
|
|
@ -2250,7 +2250,8 @@ void CPUSoftwareInterrupt(int comment)
|
||||||
break;
|
break;
|
||||||
case 0x2A:
|
case 0x2A:
|
||||||
BIOS_SndDriverJmpTableCopy();
|
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:
|
default:
|
||||||
#ifdef GBA_LOGGING
|
#ifdef GBA_LOGGING
|
||||||
if (systemVerbose & VERBOSE_SWI) {
|
if (systemVerbose & VERBOSE_SWI) {
|
||||||
|
|
|
@ -131,7 +131,7 @@ static inline uint32_t CPUReadMemory(uint32_t address)
|
||||||
value = flashRead(address) * 0x01010101;
|
value = flashRead(address) * 0x01010101;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// default
|
[[fallthrough]];
|
||||||
default:
|
default:
|
||||||
unreadable:
|
unreadable:
|
||||||
#ifdef GBA_LOGGING
|
#ifdef GBA_LOGGING
|
||||||
|
@ -281,7 +281,7 @@ static inline uint32_t CPUReadHalfWord(uint32_t address)
|
||||||
value = flashRead(address) * 0x0101;
|
value = flashRead(address) * 0x0101;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// default
|
[[fallthrough]];
|
||||||
default:
|
default:
|
||||||
unreadable:
|
unreadable:
|
||||||
if (cpuDmaRunning|| ((reg[15].I - cpuDmaPC) == (armState ? 4 : 2))) {
|
if (cpuDmaRunning|| ((reg[15].I - cpuDmaPC) == (armState ? 4 : 2))) {
|
||||||
|
@ -407,7 +407,7 @@ static inline uint8_t CPUReadByte(uint32_t address)
|
||||||
case 0x8500:
|
case 0x8500:
|
||||||
return systemGetSensorY() >> 8;
|
return systemGetSensorY() >> 8;
|
||||||
}
|
}
|
||||||
// default
|
[[fallthrough]];
|
||||||
default:
|
default:
|
||||||
unreadable:
|
unreadable:
|
||||||
#ifdef GBA_LOGGING
|
#ifdef GBA_LOGGING
|
||||||
|
|
|
@ -456,7 +456,7 @@ void BIOS_EReader_ScanCard(int swi_num)
|
||||||
THUMB_PREFETCH
|
THUMB_PREFETCH
|
||||||
} else if ((swi_num == 0xE3) || (swi_num == 0xE5)) //Dotcode data
|
} 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) {
|
if (decodestate == 0) {
|
||||||
for (i = 0x17; i >= 0; i--) {
|
for (i = 0x17; i >= 0; i--) {
|
||||||
if ((0x17 - i) < 8)
|
if ((0x17 - i) < 8)
|
||||||
|
|
Loading…
Reference in New Issue