mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-21 04:53:46 -04:00
selftests/bpf: Fix few more compiler warnings
When compiling with -O2, GCC detects few problems with selftests/bpf, so fix all of them. Two are real issues (uninitialized err and nums out-of-bounds access), but two other uninitialized variables warnings are due to GCC not being able to prove that variables are indeed initialized under conditions under which they are used. Fix all 4 cases, though. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Yonghong Song <yhs@fb.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/bpf/20220705224818.4026623-3-andrii@kernel.org
This commit is contained in:
committed by
Daniel Borkmann
parent
645d5d3bc0
commit
c46a122001
@@ -63,7 +63,7 @@ static bool expect_str(char *buf, size_t size, const char *str, const char *name
|
||||
static void test_synproxy(bool xdp)
|
||||
{
|
||||
int server_fd = -1, client_fd = -1, accept_fd = -1;
|
||||
char *prog_id, *prog_id_end;
|
||||
char *prog_id = NULL, *prog_id_end;
|
||||
struct nstoken *ns = NULL;
|
||||
FILE *ctrl_file = NULL;
|
||||
char buf[CMD_OUT_BUF_SIZE];
|
||||
|
||||
Reference in New Issue
Block a user