[PATCH/committed,11/20] sim: m68hc11: fix -Wimplicit-fallthrough warnings

Message ID 20231221070127.19142-11-vapier@gentoo.org
State New
Headers
Series [PATCH/committed,01/20] sim: signal: mark signal callback funcs as noreturn since they don't return |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply

Commit Message

Mike Frysinger Dec. 21, 2023, 7:01 a.m. UTC
  Seems like these register operations intended on falling thru.
---
 sim/m68hc11/dv-m68hc11sio.c | 1 +
 sim/m68hc11/dv-m68hc11spi.c | 1 +
 2 files changed, 2 insertions(+)
  

Patch

diff --git a/sim/m68hc11/dv-m68hc11sio.c b/sim/m68hc11/dv-m68hc11sio.c
index d5ecbe4f822e..03b44613c180 100644
--- a/sim/m68hc11/dv-m68hc11sio.c
+++ b/sim/m68hc11/dv-m68hc11sio.c
@@ -523,6 +523,7 @@  m68hc11sio_io_read_buffer (struct hw *me,
     case M6811_SCSR:
       controller->rx_clear_scsr = m68hc11_cpu->ios[M6811_SCSR]
         & (M6811_RDRF | M6811_IDLE | M6811_OR | M6811_NF | M6811_FE);
+      ATTRIBUTE_FALLTHROUGH;
       
     case M6811_BAUD:
     case M6811_SCCR1:
diff --git a/sim/m68hc11/dv-m68hc11spi.c b/sim/m68hc11/dv-m68hc11spi.c
index e552fd5de9a8..ac44e6ed7e2f 100644
--- a/sim/m68hc11/dv-m68hc11spi.c
+++ b/sim/m68hc11/dv-m68hc11spi.c
@@ -405,6 +405,7 @@  m68hc11spi_io_read_buffer (struct hw *me,
     case M6811_SPSR:
       controller->rx_clear_scsr = m68hc11_cpu->ios[M6811_SCSR]
         & (M6811_SPIF | M6811_WCOL | M6811_MODF);
+      ATTRIBUTE_FALLTHROUGH;
       
     case M6811_SPCR:
       val = m68hc11_cpu->ios[base];