summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@google.com>2020-10-02 00:54:40 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2020-10-02 16:46:20 +0200
commitcffcdbff70a3cf3cc4f42fa2e57012411b1c78a6 (patch)
tree0c6256181c0880378d85ceed7f1f86570d29d2ef /tools/testing/selftests/bpf/prog_tests/xdp_noinline.c
parentlib8390: Use netif_msg_init to initialize msg_enable bits (diff)
downloadlinux-cffcdbff70a3cf3cc4f42fa2e57012411b1c78a6.tar.xz
linux-cffcdbff70a3cf3cc4f42fa2e57012411b1c78a6.zip
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: Stanislav Fomichev <sdf@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Martin KaFai Lau <kafai@fb.com> Link: https://lore.kernel.org/bpf/20201001225440.1373233-1-sdf@google.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/xdp_noinline.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/xdp_noinline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c b/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c
index a1f06424cf83..0281095de266 100644
--- a/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c
+++ b/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c
@@ -25,7 +25,7 @@ void test_xdp_noinline(void)
__u8 flags;
} real_def = {.dst = MAGIC_VAL};
__u32 ch_key = 11, real_num = 3;
- __u32 duration, retval, size;
+ __u32 duration = 0, retval, size;
int err, i;
__u64 bytes = 0, pkts = 0;
char buf[128];