public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH/committed 07/20] sim: bfin: fix -Wimplicit-fallthrough warnings
Date: Thu, 21 Dec 2023 02:01:14 -0500	[thread overview]
Message-ID: <20231221070127.19142-7-vapier@gentoo.org> (raw)
In-Reply-To: <20231221070127.19142-1-vapier@gentoo.org>

Add the attribute to places where we want to fall thru.
---
 sim/bfin/dv-bfin_dma.c   | 1 +
 sim/bfin/dv-bfin_twi.c   | 1 +
 sim/bfin/dv-bfin_uart2.c | 1 +
 sim/bfin/interp.c        | 2 ++
 4 files changed, 5 insertions(+)

diff --git a/sim/bfin/dv-bfin_dma.c b/sim/bfin/dv-bfin_dma.c
index a3384700b2bf..4d2b95d24836 100644
--- a/sim/bfin/dv-bfin_dma.c
+++ b/sim/bfin/dv-bfin_dma.c
@@ -173,6 +173,7 @@ bfin_dma_process_desc (struct hw *me, struct bfin_dma *dma)
 	  dma->ndph = _flows[1];
 	  --ndsize;
 	  ++flows;
+	  ATTRIBUTE_FALLTHROUGH;
 	case DMAFLOW_SMALL:
 	  dma->ndpl = _flows[0];
 	  --ndsize;
diff --git a/sim/bfin/dv-bfin_twi.c b/sim/bfin/dv-bfin_twi.c
index 0ea224ca63cb..5a25320cb10c 100644
--- a/sim/bfin/dv-bfin_twi.c
+++ b/sim/bfin/dv-bfin_twi.c
@@ -118,6 +118,7 @@ bfin_twi_io_write_buffer (struct hw *me, const void *source, int space,
       break;
     case mmr_offset(xmt_data8):
       value &= 0xff;
+      ATTRIBUTE_FALLTHROUGH;
     case mmr_offset(xmt_data16):
       twi->xmt_fifo = value;
       break;
diff --git a/sim/bfin/dv-bfin_uart2.c b/sim/bfin/dv-bfin_uart2.c
index 0b55a30a55d3..5c8a50659b3c 100644
--- a/sim/bfin/dv-bfin_uart2.c
+++ b/sim/bfin/dv-bfin_uart2.c
@@ -158,6 +158,7 @@ bfin_uart_io_read_buffer (struct hw *me, void *dest,
     case mmr_offset(lsr):
       uart->lsr &= ~(DR | THRE | TEMT);
       uart->lsr |= bfin_uart_get_status (me);
+      ATTRIBUTE_FALLTHROUGH;
     case mmr_offset(thr):
     case mmr_offset(msr):
     case mmr_offset(dll):
diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c
index df1d1b3f70f2..bb0b83c01c2f 100644
--- a/sim/bfin/interp.c
+++ b/sim/bfin/interp.c
@@ -396,12 +396,14 @@ bfin_syscall (SIM_CPU *cpu)
       goto sys_finish;
     case CB_SYS_setuid:
       sc.arg1 &= 0xffff;
+      ATTRIBUTE_FALLTHROUGH;
     case CB_SYS_setuid32:
       tbuf += sprintf (tbuf, "setuid(%u)", args[0]);
       sc.result = setuid (sc.arg1);
       goto sys_finish;
     case CB_SYS_setgid:
       sc.arg1 &= 0xffff;
+      ATTRIBUTE_FALLTHROUGH;
     case CB_SYS_setgid32:
       tbuf += sprintf (tbuf, "setgid(%u)", args[0]);
       sc.result = setgid (sc.arg1);
-- 
2.43.0


  parent reply	other threads:[~2023-12-21  7:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21  7:01 [PATCH/committed 01/20] sim: signal: mark signal callback funcs as noreturn since they don't return Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 02/20] sim: add ATTRIBUTE_FALLTHROUGH for local code Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 03/20] sim: common: fix -Wimplicit-fallthrough warnings Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 04/20] sim: aarch64: " Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 05/20] sim: arm: " Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 06/20] sim: avr: " Mike Frysinger
2023-12-21  7:01 ` Mike Frysinger [this message]
2023-12-21  7:01 ` [PATCH/committed 08/20] sim: cris: " Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 09/20] sim: erc32: " Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 10/20] sim: frv: " Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 11/20] sim: m68hc11: " Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 12/20] sim: mcore: fix Wimplicit-fallthrough warnings Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 13/20] sim: mips: fix -Wimplicit-fallthrough warnings Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 14/20] sim: or1k: " Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 15/20] sim: ppc: " Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 16/20] sim: riscv: " Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 17/20] sim: rl78: " Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 18/20] sim: rx: " Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 19/20] sim: sh: " Mike Frysinger
2023-12-21  7:01 ` [PATCH/committed 20/20] sim: warnings: enable -Wimplicit-fallthrough=5 Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231221070127.19142-7-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).