On Fri, 11 Dec 2020 at 15:24, Thomas Huth <th...@redhat.com> wrote: > > From: Chen Qun <kuhn.chen...@huawei.com> > > 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 <euler.ro...@huawei.com> > Signed-off-by: Chen Qun <kuhn.chen...@huawei.com> > Message-Id: <20201028041819.2169003-10-kuhn.chen...@huawei.com> > Signed-off-by: Thomas Huth <th...@redhat.com> > --- > hw/timer/renesas_tmr.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/timer/renesas_tmr.c b/hw/timer/renesas_tmr.c > index 446f2eacdd..e03a8155b2 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];
Yes, but maybe we should just get the patch that refactors this code in instead ? thanks -- PMM