Re: [PATCH v2] perf riscv: Fix discarded const qualifier in _get_field()
From: patchwork-bot+linux-riscv
Date: Fri Jun 26 2026 - 04:33:15 EST
Hello:
This patch was applied to riscv/linux.git (fixes)
by Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>:
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