summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorKees Cook <kees@kernel.org>2025-04-16 15:27:41 -0700
committerSebastian Reichel <sebastian.reichel@collabora.com>2025-04-28 01:14:10 +0200
commit77f5bb150132bbbcd6bc37ffdc80c9e140e373a4 (patch)
tree62f79131cba03ee412dfc2b8cada223723c4c24a /tools/perf/scripts/python/exported-sql-viewer.py
parent4e55fb7d60e128fb5a57921cbd59f9ff29cd4297 (diff)
power: supply: sysfs: Remove duplicate NUL termination
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), | ^~~~~~~~~~~~~~~~~ However, the macro used was explicitly adding a trailing NUL byte (which is not needed). Remove this to avoid the GCC warning. No binary differences are seen after this change (there was always run for a NUL byte, it's just that the _second_ NUL byte was getting truncated). Signed-off-by: Kees Cook <kees@kernel.org> Link: https://lore.kernel.org/r/20250416222740.work.569-kees@kernel.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions