[PATCH 2/2] perf tools: Remove unused variable in tests/test-basic.c

From: Jiri Olsa
Date: Thu Sep 29 2022 - 10:05:53 EST


The clang 15 build reveal several unused-but-set variables,
removing the 'foo' variable in tests/mmap-basic.o object.

Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
---
tools/perf/tests/mmap-basic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c
index 21b5e68179d7..8322fc2295fa 100644
--- a/tools/perf/tests/mmap-basic.c
+++ b/tools/perf/tests/mmap-basic.c
@@ -112,8 +112,7 @@ static int test__basic_mmap(struct test_suite *test __maybe_unused, int subtest

for (i = 0; i < nsyscalls; ++i)
for (j = 0; j < expected_nr_events[i]; ++j) {
- int foo = syscalls[i]();
- ++foo;
+ syscalls[i]();
}

md = &evlist->mmap[0];
--
2.37.3