[PATCH v2] perf riscv: Fix discarded const qualifier in _get_field()
patchwork-bot+linux-riscv at kernel.org
patchwork-bot+linux-riscv at kernel.org
Fri Jun 26 01:21:10 PDT 2026
Hello:
This patch was applied to riscv/linux.git (fixes)
by Arnaldo Carvalho de Melo <acme at redhat.com>:
On Thu, 14 May 2026 02:07:21 +0800 you wrote:
> The assignment of strrchr() return values to non-const char * variables
> triggers a -Werror=discarded-qualifiers warning when building with GCC 14.
> This happens because in newer glibc versions, strrchr() returns a
> const char * if the input string is const.
>
> Properly declare 'line2' and 'nl' as const char * to match the glibc
> function signature and ensure type safety. This avoids the need for
> explicit type casting and aligns with the design pattern of not
> modifying read-only memory in the perf tool.
>
> [...]
Here is the summary with links:
- [v2] perf riscv: Fix discarded const qualifier in _get_field()
https://git.kernel.org/riscv/c/7378b6656aa4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
More information about the linux-riscv
mailing list