* [PATCH] bsd-user: Silence warnings about missing fallthrough statement
@ 2020-12-17 15:41 Thomas Huth
2020-12-17 17:49 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Huth @ 2020-12-17 15:41 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Sean Bruno, Ed Maste, Li-Wen Hsu
When compiling with -Werror=implicit-fallthrough, the compiler complains
about a missing fallthrough annotation in this file. Looking at the code,
the fallthrough is indeed wanted here, so let's add a proper comment.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
bsd-user/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 0a918e8f74..9c700c6234 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -512,6 +512,7 @@ void cpu_loop(CPUSPARCState *env)
case 0x141:
if (bsd_type != target_freebsd)
goto badtrap;
+ /* fallthrough */
case 0x100:
#endif
syscall_nr = env->gregs[1];
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bsd-user: Silence warnings about missing fallthrough statement
2020-12-17 15:41 [PATCH] bsd-user: Silence warnings about missing fallthrough statement Thomas Huth
@ 2020-12-17 17:49 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2020-12-17 17:49 UTC (permalink / raw)
To: Thomas Huth, qemu-devel; +Cc: qemu-trivial, Sean Bruno, Ed Maste, Li-Wen Hsu
On 12/17/20 9:41 AM, Thomas Huth wrote:
> When compiling with -Werror=implicit-fallthrough, the compiler complains
> about a missing fallthrough annotation in this file. Looking at the code,
> the fallthrough is indeed wanted here, so let's add a proper comment.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> bsd-user/main.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-17 17:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17 15:41 [PATCH] bsd-user: Silence warnings about missing fallthrough statement Thomas Huth
2020-12-17 17:49 ` 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).