[PATCH 1/4] perf list: Remove unused 'sep' variable
From: Arnaldo Carvalho de Melo
Date: Thu Dec 11 2025 - 17:18:07 EST
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.
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/builtin-list.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index 5cbca0bacd35237e..ac7bd0e41aa1d5d6 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -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;
--
2.52.0