[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 10/14] target/ppc: Rewrite a fall through comment
From: |
Laurent Vivier |
Subject: |
[Qemu-trivial] [PULL 10/14] target/ppc: Rewrite a fall through comment |
Date: |
Wed, 21 Aug 2019 13:19:43 +0200 |
From: Philippe Mathieu-Daudé <address@hidden>
GCC9 is confused by this comment when building with CFLAG
-Wimplicit-fallthrough=2:
target/ppc/mmu_helper.c: In function ‘dump_mmu’:
target/ppc/mmu_helper.c:1349:12: error: this statement may fall through
[-Werror=implicit-fallthrough=]
1349 | if (ppc64_v3_radix(env_archcpu(env))) {
| ^
target/ppc/mmu_helper.c:1356:5: note: here
1356 | default:
| ^~~~~~~
cc1: all warnings being treated as errors
Rewrite the comment using 'fall through' which is recognized by
GCC and static analyzers.
Reported-by: Stefan Weil <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Acked-by: David Gibson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
target/ppc/mmu_helper.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c
index 55f7a7f16a12..86c667b09415 100644
--- a/target/ppc/mmu_helper.c
+++ b/target/ppc/mmu_helper.c
@@ -100,7 +100,7 @@ static int pp_check(int key, int pp, int nx)
case 0x1:
case 0x2:
access |= PAGE_WRITE;
- /* No break here */
+ /* fall through */
case 0x3:
access |= PAGE_READ;
break;
@@ -708,7 +708,7 @@ static int mmu40x_get_physical_address(CPUPPCState *env,
mmu_ctx_t *ctx,
if (pr != 0) {
goto check_perms;
}
- /* No break here */
+ /* fall through */
case 0x3:
/* All accesses granted */
ctx->prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
@@ -722,7 +722,7 @@ static int mmu40x_get_physical_address(CPUPPCState *env,
mmu_ctx_t *ctx,
ret = -2;
break;
}
- /* No break here */
+ /* fall through */
case 0x1:
check_perms:
/* Check from TLB entry */
--
2.21.0
- [Qemu-trivial] [PULL 00/14] Trivial branch patches, Laurent Vivier, 2019/08/21
- [Qemu-trivial] [PULL 14/14] hw/display: Compile various display devices as common object, Laurent Vivier, 2019/08/21
- [Qemu-trivial] [PULL 10/14] target/ppc: Rewrite a fall through comment,
Laurent Vivier <=
- [Qemu-trivial] [PULL 06/14] hw/net/e1000: Fix erroneous comment, Laurent Vivier, 2019/08/21
- [Qemu-trivial] [PULL 01/14] test: Use g_strndup instead of plain strndup, Laurent Vivier, 2019/08/21
- [Qemu-trivial] [PULL 12/14] spapr_events: Rewrite a fall through comment, Laurent Vivier, 2019/08/21
- [Qemu-trivial] [PULL 13/14] hw/display/sm501: Remove unused include, Laurent Vivier, 2019/08/21
- [Qemu-trivial] [PULL 03/14] configure: remove obsoleted $sparc_cpu variable, Laurent Vivier, 2019/08/21
- [Qemu-trivial] [PULL 11/14] vl: Rewrite a fall through comment, Laurent Vivier, 2019/08/21
- [Qemu-trivial] [PULL 07/14] json: Move switch 'fall through' comment to correct place, Laurent Vivier, 2019/08/21
- [Qemu-trivial] [PULL 08/14] hw/dma/omap_dma: Move switch 'fall through' comment to correct place, Laurent Vivier, 2019/08/21
- [Qemu-trivial] [PULL 02/14] misc: fix naming scheme of compatiblity arrays, Laurent Vivier, 2019/08/21
- [Qemu-trivial] [PULL 05/14] .gitignore: ignore some vhost-user* related files, Laurent Vivier, 2019/08/21