mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
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
This commit is contained in:
committed by
Daniel Borkmann
parent
bc5bc309db
commit
925a01577e
@@ -378,7 +378,7 @@ static inline int enable_reuseport(int s, int progfd)
|
||||
static inline int socket_loopback_reuseport(int family, int sotype, int progfd)
|
||||
{
|
||||
struct sockaddr_storage addr;
|
||||
socklen_t len;
|
||||
socklen_t len = 0;
|
||||
int err, s;
|
||||
|
||||
init_addr_loopback(family, &addr, &len);
|
||||
|
||||
Reference in New Issue
Block a user