From: Chen Qun Date: Fri, 11 Dec 2020 15:24:18 +0000 (+0100) Subject: hw/timer/renesas_tmr: silence the compiler warnings X-Git-Tag: v6.0.0-rc0~173^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=30982862b2d81e7b4a58bac319075d343c36e06a;p=thirdparty%2Fqemu.git hw/timer/renesas_tmr: silence the compiler warnings When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning: ../hw/timer/renesas_tmr.c: In function ‘tmr_read’: ../hw/timer/renesas_tmr.c:221:19: warning: this statement may fall through [-Wimplicit-fallthrough=] 221 | } else if (ch == 0) {i | ^ ../hw/timer/renesas_tmr.c:224:5: note: here 224 | case A_TCORB: | ^~~~ Add the corresponding "fall through" comment to fix it. Reported-by: Euler Robot Signed-off-by: Chen Qun Signed-off-by: Thomas Huth Message-Id: <20201211152426.350966-5-thuth@redhat.com> Signed-off-by: Thomas Huth --- diff --git a/hw/timer/renesas_tmr.c b/hw/timer/renesas_tmr.c index 446f2eacdd7..e03a8155b2b 100644 --- a/hw/timer/renesas_tmr.c +++ b/hw/timer/renesas_tmr.c @@ -221,6 +221,7 @@ static uint64_t tmr_read(void *opaque, hwaddr addr, unsigned size) } else if (ch == 0) { return concat_reg(tmr->tcora); } + /* fall through */ case A_TCORB: if (size == 1) { return tmr->tcorb[ch];