Commit cffcdbff authored by Stanislav Fomichev's avatar Stanislav Fomichev Committed by Daniel Borkmann

selftests/bpf: Initialize duration in xdp_noinline.c

Fixes clang error:
tools/testing/selftests/bpf/prog_tests/xdp_noinline.c:35:6: error: variable 'duration' is uninitialized when used here [-Werror,-Wuninitialized]
        if (CHECK(!skel, "skel_open_and_load", "failed\n"))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: default avatarStanislav Fomichev <sdf@google.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Acked-by: default avatarMartin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20201001225440.1373233-1-sdf@google.com
parent 360f8987
...@@ -25,7 +25,7 @@ void test_xdp_noinline(void) ...@@ -25,7 +25,7 @@ void test_xdp_noinline(void)
__u8 flags; __u8 flags;
} real_def = {.dst = MAGIC_VAL}; } real_def = {.dst = MAGIC_VAL};
__u32 ch_key = 11, real_num = 3; __u32 ch_key = 11, real_num = 3;
__u32 duration, retval, size; __u32 duration = 0, retval, size;
int err, i; int err, i;
__u64 bytes = 0, pkts = 0; __u64 bytes = 0, pkts = 0;
char buf[128]; char buf[128];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment