diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-01-27 08:22:00 +0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-01-27 08:22:00 +0300 |
| commit | 0341eab66ba03a1f439db91f03bccd5b0a360842 (patch) | |
| tree | 935140efa81fa2613aea63091e45172dc51d36e3 | |
| parent | 0e47251e8cc438d5b59fcd86d27efade01976fe1 (diff) | |
| download | linux-0341eab66ba03a1f439db91f03bccd5b0a360842.tar.xz | |
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>
| -rw-r--r-- | tools/perf/util/tp_pmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |
