On Mon, 31 Mar 2025, Thorsten Leemhuis <li...@leemhuis.info> wrote: > On 10.03.25 23:23, Kees Cook wrote: >> When a character array without a terminating NUL character has a static >> initializer, GCC 15's -Wunterminated-string-initialization will only >> warn if the array lacks the "nonstring" attribute[1]. Mark the arrays >> with __nonstring to and correctly identify the char array as "not a C >> string" and thereby eliminate the warning. >> >> Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178 [1] >> [...] >> Signed-off-by: Kees Cook <k...@kernel.org> > > To provide another small data point: > > Tested-by: Thorsten Leemhuis <li...@leemhuis.info> > > A "Compile-Tested-by", to be precise: after a handful similar patches > reached mainline recently this is the only one I still need to compile > the pretty broad Fedora rawhide config on rawhide using the GCC 15 > pre-release it currently includes. The latter or the final will > hopefully soon also reach Fedora 42 beta as well and bring the "[1]" > mentioned in the patch description above to F42 -- which will be > released in a few weeks, so I guess it would be nice to have this patch > mainlined rather sooner that later to avoid more people running into this.
Thanks for testing, though I've merged [1] instead. BR, Jani. [1] https://lore.kernel.org/r/20250327124739.2609656-1-jani.nik...@intel.com -- Jani Nikula, Intel