HomeFreeBSD

GCC 15: Fix unterminated-string-initialization (#17244)

Description

GCC 15: Fix unterminated-string-initialization (#17244)

Fix build errors on Fedora 42 like:

module/zcommon/zfs_valstr.c:193:16: error: initializer-string for
array of 'char' truncates NUL terminator but destination lacks
'nonstring' attribute (3 chars into 2 available)

The arrays in zpool_vdev_os.c and zfs_valstr.c don't need to be
NULL terminated, but we do so to make GCC happy.

Closes: #17242

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>

Details

Provenance
Tony Hutter <hutter2@llnl.gov>Authored on Apr 16 2025, 4:33 PM
Parents
rGdcabac71e8d6: debian: Add libtirpc-dev dependency (#17220)
Branches
Unknown
Tags
Unknown

Event Timeline

Tony Hutter <hutter2@llnl.gov> committed rG81c62bc9e593: GCC 15: Fix unterminated-string-initialization (#17244) (authored by Tony Hutter <hutter2@llnl.gov>).May 27 2025, 10:03 PM