diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2023-10-06 10:57:42 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2023-10-06 20:17:28 +0200 |
commit | 925a01577ea5a70416731c00e42b74c97f41cb6a (patch) | |
tree | 39947655872d56199dd9a3d986b84b02aa0b38dc /tools/testing/selftests/bpf/xdp_features.c | |
parent | bc5bc309db45a7ab218ce8259ba9bc7659be61ca (diff) | |
download | linux-925a01577ea5a70416731c00e42b74c97f41cb6a.tar.gz linux-925a01577ea5a70416731c00e42b74c97f41cb6a.tar.bz2 linux-925a01577ea5a70416731c00e42b74c97f41cb6a.zip |
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/xdp_features.c')
-rw-r--r-- | tools/testing/selftests/bpf/xdp_features.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/xdp_features.c b/tools/testing/selftests/bpf/xdp_features.c index b449788fbd39..595c79141cf3 100644 --- a/tools/testing/selftests/bpf/xdp_features.c +++ b/tools/testing/selftests/bpf/xdp_features.c @@ -360,9 +360,9 @@ static int recv_msg(int sockfd, void *buf, size_t bufsize, void *val, static int dut_run(struct xdp_features *skel) { int flags = XDP_FLAGS_UPDATE_IF_NOEXIST | XDP_FLAGS_DRV_MODE; - int state, err, *sockfd, ctrl_sockfd, echo_sockfd; + int state, err = 0, *sockfd, ctrl_sockfd, echo_sockfd; struct sockaddr_storage ctrl_addr; - pthread_t dut_thread; + pthread_t dut_thread = 0; socklen_t addrlen; sockfd = start_reuseport_server(AF_INET6, SOCK_STREAM, NULL, |