summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/fexit_bpf2bpf.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2023-03-08 21:40:14 -0800
committerAlexei Starovoitov <ast@kernel.org>2023-03-10 08:14:08 -0800
commitc8ed66859397237c649998c58a68a86b8ea5f417 (patch)
tree9c13a073b663a889dcc205bceebbbbf49c0493fd /tools/testing/selftests/bpf/progs/fexit_bpf2bpf.c
parent713461b895ef958ef444b00cc2d979f3ca3a82e2 (diff)
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>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/fexit_bpf2bpf.c')
-rw-r--r--tools/testing/selftests/bpf/progs/fexit_bpf2bpf.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/progs/fexit_bpf2bpf.c b/tools/testing/selftests/bpf/progs/fexit_bpf2bpf.c
index 4547b059d487..983b7c233382 100644
--- a/tools/testing/selftests/bpf/progs/fexit_bpf2bpf.c
+++ b/tools/testing/selftests/bpf/progs/fexit_bpf2bpf.c
@@ -120,8 +120,6 @@ int new_get_skb_ifindex(int val, struct __sk_buff *skb, int var)
void *data = (void *)(long)skb->data;
struct ipv6hdr ip6, *ip6p;
int ifindex = skb->ifindex;
- __u32 eth_proto;
- __u32 nh_off;
/* check that BPF extension can read packet via direct packet access */
if (data + 14 + sizeof(ip6) > data_end)