[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v3 41/78] linux-user: add fallthrough pseudo-keyword
|
From: |
Emmanouil Pitsidianakis |
|
Subject: |
[RFC PATCH v3 41/78] linux-user: add fallthrough pseudo-keyword |
|
Date: |
Fri, 13 Oct 2023 11:46:09 +0300 |
In preparation of raising -Wimplicit-fallthrough to 5, replace all
fall-through comments with the fallthrough attribute pseudo-keyword.
Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
---
linux-user/mips/cpu_loop.c | 8 ++++----
linux-user/mmap.c | 2 +-
linux-user/syscall.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/linux-user/mips/cpu_loop.c b/linux-user/mips/cpu_loop.c
index 8735e58bad..38ddcadfc6 100644
--- a/linux-user/mips/cpu_loop.c
+++ b/linux-user/mips/cpu_loop.c
@@ -102,22 +102,22 @@ void cpu_loop(CPUMIPSState *env)
if ((ret = get_user_ual(arg8, sp_reg + 28)) != 0) {
goto done_syscall;
}
- /* fall through */
+ fallthrough;
case 7:
if ((ret = get_user_ual(arg7, sp_reg + 24)) != 0) {
goto done_syscall;
}
- /* fall through */
+ fallthrough;
case 6:
if ((ret = get_user_ual(arg6, sp_reg + 20)) != 0) {
goto done_syscall;
}
- /* fall through */
+ fallthrough;
case 5:
if ((ret = get_user_ual(arg5, sp_reg + 16)) != 0) {
goto done_syscall;
}
- /* fall through */
+ fallthrough;
default:
break;
}
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 8ccaab7859..ff33b4ccf6 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -1012,7 +1012,7 @@ abi_long target_madvise(abi_ulong start, abi_ulong
len_in, int advice)
case MADV_WIPEONFORK:
case MADV_KEEPONFORK:
ret = -EINVAL;
- /* fall through */
+ fallthrough;
case MADV_DONTNEED:
if (page_check_range(start, len, PAGE_PASSTHROUGH)) {
ret = get_errno(madvise(g2h_untagged(start), len, advice));
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index d49cd314a2..d15817846c 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -7782,7 +7782,7 @@ static int do_futex(CPUState *cpu, bool time64,
target_ulong uaddr,
case FUTEX_CMP_REQUEUE:
case FUTEX_CMP_REQUEUE_PI:
val3 = tswap32(val3);
- /* fall through */
+ fallthrough;
case FUTEX_REQUEUE:
case FUTEX_WAKE_OP:
/*
--
2.39.2
- [RFC PATCH v3 30/78] target/nios2: add fallthrough pseudo-keyword, (continued)
- [RFC PATCH v3 30/78] target/nios2: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 32/78] target/m68k: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 33/78] target/rx: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 36/78] target/openrisc: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 27/78] target/riscv: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 35/78] target/sh4: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 37/78] target/hexagon: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 40/78] hw/sd/sdhci.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 45/78] hw/dma: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 44/78] hw/m68k/mcf_intc.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 41/78] linux-user: add fallthrough pseudo-keyword,
Emmanouil Pitsidianakis <=
- [RFC PATCH v3 43/78] hw/misc: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 48/78] contrib/vhost-user-scsi: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 50/78] hw/audio: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 49/78] hw/arm: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 54/78] hw/core: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 47/78] contrib/rdmacm-mux: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 52/78] hw/char: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 38/78] system/rtc.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 51/78] chardev: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 56/78] hw/input: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13