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é <[email protected]>
> ---
> Cc: Peter Chubb <[email protected]>
> Cc: Peter Maydell <[email protected]>
> Cc: Jason Wang <[email protected]>
> Cc: [email protected]
> ---
> hw/net/imx_fec.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
Reviewed-by: Richard Henderson <[email protected]>
r~