aboutsummaryrefslogtreecommitdiff
path: root/lib/test_rhashtable.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2021-03-23 13:53:29 +0100
committerDavid S. Miller <davem@davemloft.net>2021-03-24 15:14:15 -0700
commitb7fbc88692e60a4955ac54af0bcf7f2162761339 (patch)
tree0f501bfdb670ef5a8db212748476a8b385922ffb /lib/test_rhashtable.c
parent341f67e424e572bfc034daa534c6fa667533e6a4 (diff)
downloadlinux-b7fbc88692e60a4955ac54af0bcf7f2162761339.tar.gz
octeontx2: fix -Wnonnull warning
When compile testing this driver on a platform on which probe() is known to fail at compile time, gcc warns about the cgx_lmactype_string[] array being uninitialized: In function 'strncpy', inlined from 'link_status_user_format' at /git/arm-soc/drivers/net/ethernet/marvell/octeontx2/af/cgx.c:838:2, inlined from 'cgx_link_change_handler' at /git/arm-soc/drivers/net/ethernet/marvell/octeontx2/af/cgx.c:853:2: include/linux/fortify-string.h:27:30: error: argument 2 null where non-null expected [-Werror=nonnull] 27 | #define __underlying_strncpy __builtin_strncpy Address this by turning the runtime initialization into a fixed array, which should also produce better code. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/test_rhashtable.c')
0 files changed, 0 insertions, 0 deletions