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
Patchew URL: https://patchew.org/QEMU/20200630055953.9309-1-thuth@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH] disas/sh4: Add missing fallthrough annotations Type: series Message-id: 20200630055953.9309-1-thuth@redhat.com === TEST SCRIPT BEGIN === #!/bin/bash git rev-parse base > /dev/null || exit 0 git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu e765115..fc1bff9 master -> master - [tag update] patchew/20200629173821.22037-1-f4bug@amsat.org -> patchew/20200629173821.22037-1-f4bug@amsat.org * [new tag] patchew/20200630055953.9309-1-thuth@redhat.com -> patchew/20200630055953.9309-1-thuth@redhat.com Switched to a new branch 'test' 82643b9 disas/sh4: Add missing fallthrough annotations === OUTPUT BEGIN === ERROR: code indent should never use tabs #23: FILE: disas/sh4.c:1966: +^I /* fallthrough */$ ERROR: code indent should never use tabs #31: FILE: disas/sh4.c:1976: +^I /* fallthrough */$ total: 2 errors, 0 warnings, 14 lines checked Commit 82643b95d2e7 (disas/sh4: Add missing fallthrough annotations) has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. === OUTPUT END === Test command exited with code: 1 The full log is available at http://patchew.org/logs/20200630055953.9309-1-thuth@redhat.com/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
On 6/29/20 10:59 PM, Thomas Huth wrote: > 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. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
© 2016 - 2024 Red Hat, Inc.