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

From: Arnaldo Carvalho de Melo
Date: Thu Sep 29 2022 - 14:10:59 EST


Em Thu, Sep 29, 2022 at 04:05:14PM +0200, Jiri Olsa escreveu:
> The clang 15 build reveal several unused-but-set variables,
> removing the 'foo' variable in tests/mmap-basic.o object.



Thanks, applied.

- Arnaldo


> 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

--

- Arnaldo