From: Arnaldo Carvalho de Melo Date: Tue, 27 Jan 2026 05:22:00 +0000 (-0300) Subject: perf tp_pmu: Address const-correctness errors in recent glibcs X-Git-Tag: v7.0-rc1~16^2~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0341eab66ba03a1f439db91f03bccd5b0a360842;p=thirdparty%2Flinux.git 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 --- diff --git a/tools/perf/util/tp_pmu.c b/tools/perf/util/tp_pmu.c index eddb9807131a..c2be8c9f9084 100644 --- a/tools/perf/util/tp_pmu.c +++ b/tools/perf/util/tp_pmu.c @@ -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;