base-hw: Add semicolons after [[fallthrough]]

GCC doesn't care, but clang complains if [[fallthrough]] is not followed
by a semicolon. Existing code is also not consitent in this regard. Lets
just fix it to make clang happy.

Issue #3938
This commit is contained in:
Piotr Tworek 2020-08-28 00:52:15 +02:00 committed by Christian Helmuth
parent db17d51ff1
commit 9b84a8a402
2 changed files with 10 additions and 10 deletions

View File

@ -28,13 +28,13 @@ void Thread::exception(Cpu & cpu)
{
switch (regs->exception_type) {
case Cpu::RESET: return;
case Cpu::IRQ_LEVEL_EL0: [[fallthrough]]
case Cpu::IRQ_LEVEL_EL1: [[fallthrough]]
case Cpu::FIQ_LEVEL_EL0: [[fallthrough]]
case Cpu::IRQ_LEVEL_EL0: [[fallthrough]];
case Cpu::IRQ_LEVEL_EL1: [[fallthrough]];
case Cpu::FIQ_LEVEL_EL0: [[fallthrough]];
case Cpu::FIQ_LEVEL_EL1:
_interrupt(cpu.id());
return;
case Cpu::SYNC_LEVEL_EL0: [[fallthrough]]
case Cpu::SYNC_LEVEL_EL0: [[fallthrough]];
case Cpu::SYNC_LEVEL_EL1:
{
Cpu::Esr::access_t esr = Cpu::Esr_el1::read();

View File

@ -146,15 +146,15 @@ Vm::Vm(unsigned cpu,
void Vm::exception(Cpu & cpu)
{
switch (_state.exception_type) {
case Cpu::IRQ_LEVEL_EL0: [[fallthrough]]
case Cpu::IRQ_LEVEL_EL1: [[fallthrough]]
case Cpu::FIQ_LEVEL_EL0: [[fallthrough]]
case Cpu::IRQ_LEVEL_EL0: [[fallthrough]];
case Cpu::IRQ_LEVEL_EL1: [[fallthrough]];
case Cpu::FIQ_LEVEL_EL0: [[fallthrough]];
case Cpu::FIQ_LEVEL_EL1:
_interrupt(cpu.id());
break;
case Cpu::SYNC_LEVEL_EL0: [[fallthrough]]
case Cpu::SYNC_LEVEL_EL1: [[fallthrough]]
case Cpu::SERR_LEVEL_EL0: [[fallthrough]]
case Cpu::SYNC_LEVEL_EL0: [[fallthrough]];
case Cpu::SYNC_LEVEL_EL1: [[fallthrough]];
case Cpu::SERR_LEVEL_EL0: [[fallthrough]];
case Cpu::SERR_LEVEL_EL1:
pause();
_context.submit(1);