perf tp_pmu: Address const-correctness errors in recent glibcs

To avoid having more variables, just cast the const variable searched to
non-const since the result will not be modified, its only later that
that variable will be used to modify something, but then its non-const
memory being modified, so using a cast is the cheapest thing here.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo
2026-01-27 02:22:00 -03:00
parent 0e47251e8c
commit 0341eab66b

View File

@@ -192,7 +192,7 @@ bool tp_pmu__have_event(struct perf_pmu *pmu __maybe_unused, const char *name)
char *dup_name, *colon;
int id;
colon = strchr(name, ':');
colon = strchr((char *)name, ':');
if (colon == NULL)
return false;