summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2026-01-20 23:57:43 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-01-21 02:49:59 +0300
commit2c850606a46b319d5128bda59f67b1fc642d94ef (patch)
treeb2ff618fe059268a0dc101d3621611fd3b742b64
parent01ea38942bdcd28a7962d49d6f3a602979b81009 (diff)
downloadlinux-2c850606a46b319d5128bda59f67b1fc642d94ef.tar.xz
perf trace: Deal with compiler const checks
The strchr() function these days return const/non-const based on the arg it receives, and sometimes we need to use casts when we're dealing with variables that are used in code that needs to safely change the returned value and sometimes not (as it points to really const areas). Tweak one such case. Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/builtin-trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 58a32adafddf..8df5ca44e4f9 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -5190,7 +5190,7 @@ static int trace__parse_events_option(const struct option *opt, const char *str,
}
while (1) {
- if ((sep = strchr(s, ',')) != NULL)
+ if ((sep = strchr((char *)s, ',')) != NULL)
*sep = '\0';
list = 0;