Skip to content

Compile QEMU with -Wimplicit-fallthrough

Thomas Huth qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12disas/libvixl: Fix fall-through annotation for GCC >= 7disas/libvixl/vixl/a64/disasm-a64.cc disas/libvixl/vixl/globals.h+8 -21 reply
2/12target/unicore32/translate: Add missing fallthrough annotationstarget/unicore32/translate.c+2 -00 replies
3/12hw/rtc/twl92230: Silence warnings about missing fallthrough statementshw/rtc/twl92230.c+13 -301 reply
4/12hw/timer/renesas_tmr: silence the compiler warningshw/timer/renesas_tmr.c+1 -02 replies
5/12target/i386: silence the compiler warnings in gen_shiftd_rm_T1target/i386/translate.c+5 -20 replies
6/12hw/intc/arm_gicv3_kvm: silence the compiler warningshw/intc/arm_gicv3_kvm.c+8 -00 replies
7/12accel/tcg/user-exec: silence the compiler warningsaccel/tcg/user-exec.c+2 -10 replies
8/12target/sparc/translate: silence the compiler warningstarget/sparc/translate.c+1 -10 replies
9/12target/sparc/win_helper: silence the compiler warningstarget/sparc/win_helper.c+1 -10 replies
10/12tcg/optimize: Add fallthrough annotationsinclude/qemu/compiler.h tcg/optimize.c+15 -01 reply
11/12tests/fp: Do not emit implicit-fallthrough warnings in the softfloat teststests/fp/meson.build+2 -02 replies
12/12configure: Compile with -Wimplicit-fallthrough=2configure+1 -02 replies

Reviews trailers per patch

11 of 12 patches have a Reviewed-by or Acked-by.

PatchRichard HendersonPhilippe Mathieu-DaudéThomas HuthAlex BennéeArtyom TarasenkoPeter MaydellChen Qun
1/12R-b
2/12R-b
3/12R-b
4/12
5/12R-b R-b
6/12R-b
7/12R-b R-b R-b R-b
8/12R-b R-b
9/12R-b R-b R-b
10/12R-b
11/12R-b R-b
12/12R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 7 reviewers.

Read the v1 thread

Cover letter [PATCH 00/12] Compile QEMU with -Wimplicit-fallthrough

Coverity is already reporting switch-case statements where code can fall through from one case to another without a proper comment (since this could indicate a missing "break" and thus a bug). However, it's cumbersome to fix these issues after they have been merged already, it would be better if the author of the code would already take care of this when writing the patch. Fortunately, GCC and Clang can already warn about those code spots, too. So let's fix our remaining statements that fall through without a proper comment, so we can finally turn on -Wimplicit-fallthrough for all compilation runs.

Chen Qun (6):
hw/timer/renesas_tmr: silence the compiler warnings target/i386: silence the compiler warnings in gen_shiftd_rm_T1 hw/intc/arm_gicv3_kvm: silence the compiler warnings accel/tcg/user-exec: silence the compiler warnings target/sparc/translate: silence the compiler warnings target/sparc/win_helper: silence the compiler warnings

Thomas Huth (6):
disas/libvixl: Fix fall-through annotation for GCC >= 7 target/unicore32/translate: Add missing fallthrough annotations hw/rtc/twl92230: Silence warnings about missing fallthrough statements tcg/optimize: Add fallthrough annotations
tests/fp: Do not emit implicit-fallthrough warnings in the softfloat
tests
configure: Compile with -Wimplicit-fallthrough=2

 accel/tcg/user-exec.c                |  3 +-
 configure                            |  1 +
 disas/libvixl/vixl/a64/disasm-a64.cc |  4 +++
 disas/libvixl/vixl/globals.h         |  6 ++--
 hw/intc/arm_gicv3_kvm.c              |  8 ++++++
 hw/rtc/twl92230.c                    | 43 +++++++++-------------------
 hw/timer/renesas_tmr.c               |  1 +
 include/qemu/compiler.h              | 11 +++++++
 target/i386/translate.c              |  7 +++--
 target/sparc/translate.c             |  2 +-
 target/sparc/win_helper.c            |  2 +-
 target/unicore32/translate.c         |  2 ++
 tcg/optimize.c                       |  4 +++
 tests/fp/meson.build                 |  2 ++
 14 files changed, 59 insertions(+), 37 deletions(-)
Signature · 1 line
2.27.0