The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ba0a11512237681fc621670023d56195cb8c82ad
commit ba0a11512237681fc621670023d56195cb8c82ad Author: Dimitry Andric <[email protected]> AuthorDate: 2025-12-26 00:22:03 +0000 Commit: Dimitry Andric <[email protected]> CommitDate: 2025-12-26 00:22:18 +0000 makefs: avoid warnings about too-long initializer strings Mark `direntry::deName` as `__non_string`, to avoid warnings from clang 21 similar to: usr.sbin/makefs/msdos/msdosfs_vnops.c:512:4: error: initializer-string for character array is too long, array size is 11 but initializer has size 12 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization] 512 | { ". ", /* the . entry */ | ^~~~~~~~~~~~~ usr.sbin/makefs/msdos/msdosfs_vnops.c:522:4: error: initializer-string for character array is too long, array size is 11 but initializer has size 12 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization] 522 | { ".. ", /* the .. entry */ | ^~~~~~~~~~~~~ MFC after: 3 days --- usr.sbin/makefs/msdos/direntry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/makefs/msdos/direntry.h b/usr.sbin/makefs/msdos/direntry.h index 9d6c65dfcc7d..675a70e26474 100644 --- a/usr.sbin/makefs/msdos/direntry.h +++ b/usr.sbin/makefs/msdos/direntry.h @@ -55,7 +55,7 @@ * Structure of a dos directory entry. */ struct direntry { - uint8_t deName[11]; /* filename, blank filled */ + uint8_t deName[11] __nonstring; /* filename, blank filled */ #define SLOT_EMPTY 0x00 /* slot has never been used */ #define SLOT_E5 0x05 /* the real value is 0xe5 */ #define SLOT_DELETED 0xe5 /* file in this slot deleted */
