]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Fix an unused-but-set-variable compiler warning
authorYonghong Song <yhs@fb.com>
Fri, 12 Nov 2021 20:48:33 +0000 (12:48 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 12 Nov 2021 22:11:46 +0000 (14:11 -0800)
commitec6fafe1d1f17c8e2b4b2af4807b5de673bf4ef6
tree600349e7d24a866d8eae8cf6f7a2ac8fa0dca80e
parentc866e8e362f48e085d15c86d03e146b5ac193c5d
selftests/bpf: Fix an unused-but-set-variable compiler warning

When using clang to build selftests with LLVM=1 in make commandline,
I hit the following compiler warning:
  xdpxceiver.c:747:6: warning: variable 'total' set but not used [-Wunused-but-set-variable]
          u32 total = 0;
              ^

This patch fixed the issue by removing that declaration and its
assocatied unused operation.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211112204833.3579457-1-yhs@fb.com
tools/testing/selftests/bpf/xdpxceiver.c