summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2026-04-08 20:31:56 +0300
committerNamhyung Kim <namhyung@kernel.org>2026-04-09 05:21:04 +0300
commitd3e01be6daab9f76f3c8b0ffd556ed9f18275c22 (patch)
tree915ba9cd7900491a5a19adb4900b3ed324b04298
parentf552b132e4d5248715828e7e5c2bf7889bf05b2e (diff)
downloadlinux-d3e01be6daab9f76f3c8b0ffd556ed9f18275c22.tar.xz
perf symbols: Make variable receiving result strrchr() const
Fixing: util/symbol.c: In function ‘symbol__config_symfs’: util/symbol.c:2499:20: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 2499 | layout_str = strrchr(dir, ','); | With recent gcc/glibc. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
-rw-r--r--tools/perf/util/symbol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 94745a12973f..fcaeeddbbb6b 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -2493,7 +2493,7 @@ int symbol__config_symfs(const struct option *opt __maybe_unused,
const char *dir, int unset __maybe_unused)
{
char *bf = NULL;
- char *layout_str;
+ const char *layout_str;
char *dir_copy;
int ret;