Message ID | 20201030004046.2191790-7-kuhn.chenqun@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | silence the compiler warnings | expand |
On 10/29/20 5:40 PM, Chen Qun wrote: > When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning: > target/sparc/win_helper.c: In function ‘get_gregset’: > target/sparc/win_helper.c:304:9: warning: this statement may fall through [-Wimplicit-fallthrough=] > 304 | trace_win_helper_gregset_error(pstate); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > target/sparc/win_helper.c:306:5: note: here > 306 | case 0: > | ^~~~ > > Add the corresponding "fall through" comment to fix it. > > Reported-by: Euler Robot <euler.robot@huawei.com> > Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com> > Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com> > --- > v1->v2: Combine the /* fall through */ to the preceding comments > (Base on Philippe's comments). Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
On 10/30/20 1:40 AM, Chen Qun wrote: > When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning: > target/sparc/win_helper.c: In function ‘get_gregset’: > target/sparc/win_helper.c:304:9: warning: this statement may fall through [-Wimplicit-fallthrough=] > 304 | trace_win_helper_gregset_error(pstate); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > target/sparc/win_helper.c:306:5: note: here > 306 | case 0: > | ^~~~ > > Add the corresponding "fall through" comment to fix it. > > Reported-by: Euler Robot <euler.robot@huawei.com> > Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com> > Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com> > --- > v1->v2: Combine the /* fall through */ to the preceding comments > (Base on Philippe's comments). Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff --git a/target/sparc/win_helper.c b/target/sparc/win_helper.c index 8290a21142..e78660b60a 100644 --- a/target/sparc/win_helper.c +++ b/target/sparc/win_helper.c @@ -302,7 +302,7 @@ static inline uint64_t *get_gregset(CPUSPARCState *env, uint32_t pstate) switch (pstate) { default: trace_win_helper_gregset_error(pstate); - /* pass through to normal set of global registers */ + /* fall through to normal set of global registers */ case 0: return env->bgregs; case PS_AG: