[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/6] hw/net/imx_fec: Rewrite fall through comments
From: |
Richard Henderson |
Subject: |
Re: [PATCH 3/6] hw/net/imx_fec: Rewrite fall through comments |
Date: |
Tue, 17 Dec 2019 17:45:45 -1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
On 12/17/19 7:34 AM, Philippe Mathieu-Daudé wrote:
> GCC9 is confused by this comment when building with CFLAG
> -Wimplicit-fallthrough=2:
>
> hw/net/imx_fec.c: In function ‘imx_eth_write’:
> hw/net/imx_fec.c:906:12: error: this statement may fall through
> [-Werror=implicit-fallthrough=]
> 906 | if (unlikely(single_tx_ring)) {
> | ^
> hw/net/imx_fec.c:912:5: note: here
> 912 | case ENET_TDAR: /* FALLTHROUGH */
> | ^~~~
> cc1: all warnings being treated as errors
>
> Rewrite the comments in the correct place, using 'fall through'
> which is recognized by GCC and static analyzers.
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> Cc: Peter Chubb <address@hidden>
> Cc: Peter Maydell <address@hidden>
> Cc: Jason Wang <address@hidden>
> Cc: address@hidden
> ---
> hw/net/imx_fec.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
Reviewed-by: Richard Henderson <address@hidden>
r~
- Re: [PATCH 1/6] audio/audio: Add missing fall through comment, (continued)
[PATCH 2/6] hw/display/tcx: Add missing fall through comments, Philippe Mathieu-Daudé, 2019/12/17
[PATCH 3/6] hw/net/imx_fec: Rewrite fall through comments, Philippe Mathieu-Daudé, 2019/12/17
Re: [PATCH 3/6] hw/net/imx_fec: Rewrite fall through comments,
Richard Henderson <=
Re: [PATCH 3/6] hw/net/imx_fec: Rewrite fall through comments, Aleksandar Markovic, 2019/12/18
[PATCH 4/6] hw/timer/aspeed_timer: Add a fall through comment, Philippe Mathieu-Daudé, 2019/12/17
[PATCH 5/6] hw/scsi/megasas: Silent GCC9 duplicated-cond warning, Philippe Mathieu-Daudé, 2019/12/17
[PATCH 6/6] qemu-io-cmds: Silent GCC9 format-overflow warning, Philippe Mathieu-Daudé, 2019/12/17