]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf list: Remove unused 'sep' variable
authorArnaldo Carvalho de Melo <acme@kernel.org>
Thu, 11 Dec 2025 22:17:53 +0000 (19:17 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 17 Dec 2025 12:30:37 +0000 (09:30 -0300)
It is just being set to the return of strchr() but never used, just
ditch it and with it get rid of a warning about it not being const on
fedora 44.

Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20251211221756.96294-2-acme@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-list.c

index 5cbca0bacd35237e5a1252bf21f3809da8c92e9b..ac7bd0e41aa1d5d68429f072c155aa17d04227dd 100644 (file)
@@ -648,7 +648,7 @@ int cmd_list(int argc, const char **argv)
        }
 
        for (i = 0; i < argc; ++i) {
-               char *sep, *s;
+               char *s;
 
                if (strcmp(argv[i], "tracepoint") == 0) {
                        char *old_pmu_glob = default_ps.pmu_glob;
@@ -720,7 +720,7 @@ int cmd_list(int argc, const char **argv)
                else if (strcmp(argv[i], "pfm") == 0)
                        print_libpfm_events(&print_cb, ps);
 #endif
-               else if ((sep = strchr(argv[i], ':')) != NULL) {
+               else if (strchr(argv[i], ':') != NULL) {
                        char *old_pmu_glob = ps->pmu_glob;
                        char *old_event_glob = ps->event_glob;