aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/sendmsg4_prog.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2023-03-09 05:40:14 +0000
committerAlexei Starovoitov <[email protected]>2023-03-10 16:14:08 +0000
commitc8ed66859397237c649998c58a68a86b8ea5f417 (patch)
tree9c13a073b663a889dcc205bceebbbbf49c0493fd /tools/testing/selftests/bpf/progs/sendmsg4_prog.c
parentselftests/bpf: add __sink() macro to fake variable consumption (diff)
downloadkernel-c8ed66859397237c649998c58a68a86b8ea5f417.tar.gz
kernel-c8ed66859397237c649998c58a68a86b8ea5f417.zip
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/sendmsg4_prog.c')
-rw-r--r--tools/testing/selftests/bpf/progs/sendmsg4_prog.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/progs/sendmsg4_prog.c b/tools/testing/selftests/bpf/progs/sendmsg4_prog.c
index ea75a44cb7fc..351e79aef2fa 100644
--- a/tools/testing/selftests/bpf/progs/sendmsg4_prog.c
+++ b/tools/testing/selftests/bpf/progs/sendmsg4_prog.c
@@ -21,8 +21,6 @@
SEC("cgroup/sendmsg4")
int sendmsg_v4_prog(struct bpf_sock_addr *ctx)
{
- int prio;
-
if (ctx->type != SOCK_DGRAM)
return 0;