[PATCH/committed,18/20] sim: rx: fix -Wimplicit-fallthrough warnings

Message ID 20231221070127.19142-18-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 warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged

Commit Message

Mike Frysinger Dec. 21, 2023, 7:01 a.m. UTC
  Replace some fall through comments with the attribute.
---
 sim/rx/rx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/sim/rx/rx.c b/sim/rx/rx.c
index 7c02a336bd59..f4f785b938b5 100644
--- a/sim/rx/rx.c
+++ b/sim/rx/rx.c
@@ -411,7 +411,7 @@  get_op (const RX_Opcode_Decoded *rd, int i)
 
     case RX_Operand_Predec:	/* [-Rn] */
       put_reg (o->reg, get_reg (o->reg) - size2bytes[o->size]);
-      /* fall through */
+      ATTRIBUTE_FALLTHROUGH;
     case RX_Operand_Postinc:	/* [Rn+] */
     case RX_Operand_Zero_Indirect:	/* [Rn + 0] */
     case RX_Operand_Indirect:	/* [Rn + addend] */
@@ -583,7 +583,7 @@  put_op (const RX_Opcode_Decoded *rd, int i, int v)
 
     case RX_Operand_Predec:	/* [-Rn] */
       put_reg (o->reg, get_reg (o->reg) - size2bytes[o->size]);
-      /* fall through */
+      ATTRIBUTE_FALLTHROUGH;
     case RX_Operand_Postinc:	/* [Rn+] */
     case RX_Operand_Zero_Indirect:	/* [Rn + 0] */
     case RX_Operand_Indirect:	/* [Rn + addend] */