linux/drivers/net/ethernet/sun
Nathan Chancellor 09073525f8 net: ethernet: sun: Zero initialize class in default case in niu_add_ethtool_tcam_entry
When building with -Wsometimes-uninitialized, Clang warns:

drivers/net/ethernet/sun/niu.c:7466:5: warning: variable 'class' is used
uninitialized whenever switch default is taken
[-Wsometimes-uninitialized]

The default case can never happen because i can only be 0 to 3
(NIU_L3_PROG_CLS is defined as 4). To make this clear to Clang,
just zero initialize class in the default case (use the macro
CLASS_CODE_UNRECOG to make it clear this shouldn't happen).

Link: https://github.com/ClangBuiltLinux/linux/issues/403
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-03-08 15:26:21 -08:00
..
cassini.c net: sun: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-06 17:38:15 -08:00
cassini.h net: sun: cassini: Cleanup license conflict 2019-01-22 11:22:07 -08:00
Kconfig sun: Add SPDX license tags to Sun network drivers 2018-02-07 21:51:02 -05:00
ldmvsw.c net: sun: fix return type of ndo_start_xmit function 2018-09-19 21:17:58 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
niu.c net: ethernet: sun: Zero initialize class in default case in niu_add_ethtool_tcam_entry 2019-03-08 15:26:21 -08:00
niu.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sunbmac.c net: sun: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-06 17:38:15 -08:00
sunbmac.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sungem.c net: sungem: fix indentation, remove a tab 2019-01-16 14:04:59 -08:00
sungem.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sunhme.c net: sun: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-06 17:38:15 -08:00
sunhme.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sunqe.c net: sun: fix return type of ndo_start_xmit function 2018-09-19 21:17:58 -07:00
sunqe.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sunvnet_common.c net: sun: fix return type of ndo_start_xmit function 2018-09-19 21:17:58 -07:00
sunvnet_common.h net: sun: fix return type of ndo_start_xmit function 2018-09-19 21:17:58 -07:00
sunvnet.c net: sun: fix return type of ndo_start_xmit function 2018-09-19 21:17:58 -07:00