mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-01 15:15:19 -04:00
selftests/bpf: fix lots of silly mistakes pointed out by compiler
Once we enable -Wall for BPF sources, compiler will complain about lots of unused variables, variables that are set but never read, etc. Fix all these issues first before enabling -Wall in Makefile. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/r/20230309054015.4068562-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
committed by
Alexei Starovoitov
parent
713461b895
commit
c8ed668593
@@ -82,7 +82,6 @@ static __always_inline int handle_ipv4(struct xdp_md *xdp, struct bpf_dynptr *xd
|
||||
struct iptnl_info *tnl;
|
||||
struct ethhdr *new_eth;
|
||||
struct ethhdr *old_eth;
|
||||
__u32 transport_hdr_sz;
|
||||
struct iphdr *iph;
|
||||
__u16 *next_iph;
|
||||
__u16 payload_len;
|
||||
@@ -165,7 +164,6 @@ static __always_inline int handle_ipv6(struct xdp_md *xdp, struct bpf_dynptr *xd
|
||||
struct iptnl_info *tnl;
|
||||
struct ethhdr *new_eth;
|
||||
struct ethhdr *old_eth;
|
||||
__u32 transport_hdr_sz;
|
||||
struct ipv6hdr *ip6h;
|
||||
__u16 payload_len;
|
||||
struct vip vip = {};
|
||||
|
||||
Reference in New Issue
Block a user