From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH/committed 10/20] sim: frv: fix -Wimplicit-fallthrough warnings
Date: Thu, 21 Dec 2023 02:01:17 -0500 [thread overview]
Message-ID: <20231221070127.19142-10-vapier@gentoo.org> (raw)
In-Reply-To: <20231221070127.19142-1-vapier@gentoo.org>
Replace some fall through comments with the attribute.
---
sim/frv/cache.c | 2 +-
sim/frv/interrupts.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sim/frv/cache.c b/sim/frv/cache.c
index c2beb39d3ef8..2d0fe5a590e9 100644
--- a/sim/frv/cache.c
+++ b/sim/frv/cache.c
@@ -136,7 +136,7 @@ frv_cache_reconfigure (SIM_CPU *current_cpu, FRV_CACHE *cache)
break;
}
}
- /* fall through */
+ ATTRIBUTE_FALLTHROUGH;
default:
/* Set the cache to its original settings. */
cache->sets = cache->configured_sets;
diff --git a/sim/frv/interrupts.c b/sim/frv/interrupts.c
index baf058f18d4a..979360738bab 100644
--- a/sim/frv/interrupts.c
+++ b/sim/frv/interrupts.c
@@ -835,7 +835,7 @@ set_exception_status_registers (
{
case FRV_DIVISION_EXCEPTION:
set_isr_exception_fields (current_cpu, item);
- /* fall thru to set reg_index. */
+ ATTRIBUTE_FALLTHROUGH; /* To set reg_index. */
case FRV_COMMIT_EXCEPTION:
/* For fr550, always use ESR0. */
if (STATE_ARCHITECTURE (sd)->mach == bfd_mach_fr550)
@@ -855,7 +855,7 @@ set_exception_status_registers (
break;
case FRV_DATA_ACCESS_EXCEPTION:
set_daec = 1;
- /* fall through */
+ ATTRIBUTE_FALLTHROUGH;
case FRV_DATA_ACCESS_MMU_MISS:
case FRV_MEM_ADDRESS_NOT_ALIGNED:
/* Get the appropriate ESR, EPCR, EAR and EDR.
--
2.43.0
next prev 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 ` [PATCH/committed 07/20] sim: bfin: " Mike Frysinger
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 ` Mike Frysinger [this message]
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-10-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).