qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] disas/sh4: Add missing fallthrough annotations
@ 2020-06-30  5:59 Thomas Huth
  2020-06-30  6:08 ` no-reply
  2020-07-09 16:13 ` Richard Henderson
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Huth @ 2020-06-30  5:59 UTC (permalink / raw)
  To: qemu-devel, Yoshinori Sato; +Cc: qemu-trivial

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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-09 16:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-30  5:59 [PATCH] disas/sh4: Add missing fallthrough annotations Thomas Huth
2020-06-30  6:08 ` no-reply
2020-07-09 16:13 ` Richard Henderson

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).