[PATCH 1/6] perf symbols: Make variable receiving result strrchr() const
From: Arnaldo Carvalho de Melo
Date: Tue Apr 07 2026 - 15:52:19 EST
From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
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@xxxxxxxxxx>
---
tools/perf/util/symbol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index b4b30675688dbda5..708375d67b85fd1f 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -2492,7 +2492,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;
--
2.53.0