From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: qemu-trivial@nongnu.org
Subject: [PATCH] disas/sh4: Add missing fallthrough annotations
Date: Tue, 30 Jun 2020 07:59:53 +0200 [thread overview]
Message-ID: <20200630055953.9309-1-thuth@redhat.com> (raw)
Add fallthrough annotations to be able to compile the code without
warnings with -Wimplicit-fallthrough. Looking at the code, it seems
like the fallthrough is indeed intended here, so the comments should
be appropriate.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
Note: The new lines use TABs since all the surounding code uses TABs, too.
Please ignore the checkpatch warnings.
disas/sh4.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/disas/sh4.c b/disas/sh4.c
index 55ef865a36..dcdbdf26d8 100644
--- a/disas/sh4.c
+++ b/disas/sh4.c
@@ -1963,6 +1963,7 @@ print_insn_sh (bfd_vma memaddr, struct disassemble_info *info)
fprintf_fn (stream, "xd%d", rn & ~1);
break;
}
+ /* fallthrough */
case D_REG_N:
fprintf_fn (stream, "dr%d", rn);
break;
@@ -1972,6 +1973,7 @@ print_insn_sh (bfd_vma memaddr, struct disassemble_info *info)
fprintf_fn (stream, "xd%d", rm & ~1);
break;
}
+ /* fallthrough */
case D_REG_M:
fprintf_fn (stream, "dr%d", rm);
break;
--
2.18.1
next reply other threads:[~2020-06-30 6:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-30 5:59 Thomas Huth [this message]
2020-06-30 6:08 ` [PATCH] disas/sh4: Add missing fallthrough annotations no-reply
2020-07-09 16:13 ` Richard Henderson
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=20200630055953.9309-1-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=ysato@users.sourceforge.jp \
/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 NNTP newsgroup(s).