summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/queue_stack_map.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2023-10-06 20:57:42 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2023-10-06 21:17:28 +0300
commit925a01577ea5a70416731c00e42b74c97f41cb6a (patch)
tree39947655872d56199dd9a3d986b84b02aa0b38dc /tools/testing/selftests/bpf/prog_tests/queue_stack_map.c
parentbc5bc309db45a7ab218ce8259ba9bc7659be61ca (diff)
downloadlinux-925a01577ea5a70416731c00e42b74c97f41cb6a.tar.xz
selftests/bpf: Fix compiler warnings reported in -O2 mode
Fix a bunch of potentially unitialized variable usage warnings that are reported by GCC in -O2 mode. Also silence overzealous stringop-truncation class of warnings. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/bpf/20231006175744.3136675-1-andrii@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/queue_stack_map.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/queue_stack_map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/queue_stack_map.c b/tools/testing/selftests/bpf/prog_tests/queue_stack_map.c
index 722c5f2a7776..a043af9cd6d9 100644
--- a/tools/testing/selftests/bpf/prog_tests/queue_stack_map.c
+++ b/tools/testing/selftests/bpf/prog_tests/queue_stack_map.c
@@ -14,7 +14,7 @@ static void test_queue_stack_map_by_type(int type)
int i, err, prog_fd, map_in_fd, map_out_fd;
char file[32], buf[128];
struct bpf_object *obj;
- struct iphdr iph;
+ struct iphdr iph = {};
LIBBPF_OPTS(bpf_test_run_opts, topts,
.data_in = &pkt_v4,
.data_size_in = sizeof(pkt_v4),