aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fpga/tests
diff options
context:
space:
mode:
authorSimon Horman <[email protected]>2024-09-16 09:50:34 +0000
committerPablo Neira Ayuso <[email protected]>2024-09-26 11:03:02 +0000
commitfc56878ca1c288e49b5cbb43860a5938e3463654 (patch)
tree600cb58cfc89d9ae612439d5f97d2fec985dc330 /drivers/fpga/tests
parentnetfilter: nf_tables: Keep deleted flowtable hooks until after RCU (diff)
downloadkernel-fc56878ca1c288e49b5cbb43860a5938e3463654.tar.gz
kernel-fc56878ca1c288e49b5cbb43860a5938e3463654.zip
netfilter: nf_reject: Fix build warning when CONFIG_BRIDGE_NETFILTER=n
If CONFIG_BRIDGE_NETFILTER is not enabled, which is the case for x86_64 defconfig, then building nf_reject_ipv4.c and nf_reject_ipv6.c with W=1 using gcc-14 results in the following warnings, which are treated as errors: net/ipv4/netfilter/nf_reject_ipv4.c: In function 'nf_send_reset': net/ipv4/netfilter/nf_reject_ipv4.c:243:23: error: variable 'niph' set but not used [-Werror=unused-but-set-variable] 243 | struct iphdr *niph; | ^~~~ cc1: all warnings being treated as errors net/ipv6/netfilter/nf_reject_ipv6.c: In function 'nf_send_reset6': net/ipv6/netfilter/nf_reject_ipv6.c:286:25: error: variable 'ip6h' set but not used [-Werror=unused-but-set-variable] 286 | struct ipv6hdr *ip6h; | ^~~~ cc1: all warnings being treated as errors Address this by reducing the scope of these local variables to where they are used, which is code only compiled when CONFIG_BRIDGE_NETFILTER enabled. Compile tested and run through netfilter selftests. Reported-by: Andy Shevchenko <[email protected]> Closes: https://lore.kernel.org/netfilter-devel/[email protected]/ Signed-off-by: Simon Horman <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
Diffstat (limited to 'drivers/fpga/tests')
0 files changed, 0 insertions, 0 deletions