selftests/bpf: Fix compiler warnings reported in -O2 mode
authorAndrii Nakryiko <andrii@kernel.org>
Fri, 6 Oct 2023 17:57:42 +0000 (10:57 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 6 Oct 2023 18:17:28 +0000 (20:17 +0200)
commit925a01577ea5a70416731c00e42b74c97f41cb6a
tree39947655872d56199dd9a3d986b84b02aa0b38dc
parentbc5bc309db45a7ab218ce8259ba9bc7659be61ca
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
15 files changed:
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/map_tests/map_in_map_batch_ops.c
tools/testing/selftests/bpf/prog_tests/bloom_filter_map.c
tools/testing/selftests/bpf/prog_tests/connect_ping.c
tools/testing/selftests/bpf/prog_tests/linked_list.c
tools/testing/selftests/bpf/prog_tests/lwt_helpers.h
tools/testing/selftests/bpf/prog_tests/queue_stack_map.c
tools/testing/selftests/bpf/prog_tests/sockmap_basic.c
tools/testing/selftests/bpf/prog_tests/sockmap_helpers.h
tools/testing/selftests/bpf/prog_tests/sockmap_listen.c
tools/testing/selftests/bpf/prog_tests/xdp_metadata.c
tools/testing/selftests/bpf/test_loader.c
tools/testing/selftests/bpf/xdp_features.c
tools/testing/selftests/bpf/xdp_hw_metadata.c
tools/testing/selftests/bpf/xskxceiver.c