[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <174579644553.306236.1161318959919770313.b4-ty@collabora.com>
Date: Mon, 28 Apr 2025 01:27:25 +0200
From: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Sebastian Reichel <sre@...nel.org>, Kees Cook <kees@...nel.org>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH] power: supply: sysfs: Remove duplicate NUL termination
On Wed, 16 Apr 2025 15:27:41 -0700, Kees Cook wrote:
> GCC 15's new -Wunterminated-string-initialization notices that one of
> the sysfs attr strings would lack the implicit trailing NUL byte during
> initialization:
>
> drivers/power/supply/power_supply_sysfs.c:183:57: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (32 chars into 31 available) [-Wunterminated-string-initialization]
> 183 | POWER_SUPPLY_ATTR(CHARGE_CONTROL_START_THRESHOLD),
> | ^
> drivers/power/supply/power_supply_sysfs.c:36:23: note: in definition of macro '_POWER_SUPPLY_ATTR'
> 36 | .attr_name = #_name "\0", \
> | ^~~~~
> drivers/power/supply/power_supply_sysfs.c:183:9: note: in expansion of macro 'POWER_SUPPLY_ATTR'
> 183 | POWER_SUPPLY_ATTR(CHARGE_CONTROL_START_THRESHOLD),
> | ^~~~~~~~~~~~~~~~~
>
> [...]
Applied, thanks!
[1/1] power: supply: sysfs: Remove duplicate NUL termination
commit: 77f5bb150132bbbcd6bc37ffdc80c9e140e373a4
Best regards,
--
Sebastian Reichel <sebastian.reichel@...labora.com>
Powered by blists - more mailing lists