From 4298ce18fb33d5935231a83bcf1f60289eb6b09c Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 15 Nov 2020 03:58:54 +1100 Subject: Enable GCC implicit fallthrough warning. I've guessed whether break or [[fallthrough]] is appropriate. In cases where it looked particularly suspicious, I added a FIXME comment. All of these changes should be reviewed by someone familiar with the code. --- src/devices/bus/electron/plus2.cpp | 1 + src/devices/bus/electron/romboxp.cpp | 2 ++ 2 files changed, 3 insertions(+) (limited to 'src/devices/bus/electron') diff --git a/src/devices/bus/electron/plus2.cpp b/src/devices/bus/electron/plus2.cpp index 1e9d9d6591b..7eeb4b2cd95 100644 --- a/src/devices/bus/electron/plus2.cpp +++ b/src/devices/bus/electron/plus2.cpp @@ -126,6 +126,7 @@ uint8_t electron_plus2_device::expbus_r(offs_t offset) case 13: data &= m_cart[0]->read(offset & 0x3fff, 0, 0, m_romsel & 0x01, 0, 1); data &= m_cart[1]->read(offset & 0x3fff, 0, 0, m_romsel & 0x01, 0, 1); + [[fallthrough]]; case 14: case 15: data &= m_rom[m_romsel - 13]->read_rom(offset & 0x3fff); diff --git a/src/devices/bus/electron/romboxp.cpp b/src/devices/bus/electron/romboxp.cpp index 9408ce1cc74..e6cfd472989 100644 --- a/src/devices/bus/electron/romboxp.cpp +++ b/src/devices/bus/electron/romboxp.cpp @@ -201,6 +201,7 @@ uint8_t electron_romboxp_device::expbus_r(offs_t offset) case 13: data &= m_cart[0]->read(offset & 0x3fff, 0, 0, m_romsel & 0x01, 0, 1); data &= m_cart[1]->read(offset & 0x3fff, 0, 0, m_romsel & 0x01, 0, 1); + [[fallthrough]]; case 14: case 15: if (m_rom_base == 12) @@ -274,6 +275,7 @@ void electron_romboxp_device::expbus_w(offs_t offset, uint8_t data) case 13: m_cart[0]->write(offset & 0x3fff, data, 0, 0, m_romsel & 0x01, 0, 1); m_cart[1]->write(offset & 0x3fff, data, 0, 0, m_romsel & 0x01, 0, 1); + [[fallthrough]]; case 14: case 15: if (m_rom_base == 12) -- cgit v1.2.3-70-g09d2