Date: Mon, 29 Dec 2025 12:23:59 +0000 From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 21708f480a10 - stable/13 - fsck_msdosfs: avoid warnings about too-long initializer strings Message-ID: <695272df.31f66.2bb34fce@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=21708f480a10738f1930c312c500d9a2a25cb5b8 commit 21708f480a10738f1930c312c500d9a2a25cb5b8 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2025-12-25 20:28:14 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2025-12-29 12:19:16 +0000 fsck_msdosfs: avoid warnings about too-long initializer strings Mark `dot_name` and `dotdot_name` as as `__non_string`, to avoid warnings from clang 21 similar to: sbin/fsck_msdosfs/dir.c:466:39: 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] 466 | static const u_char dot_name[11] = ". "; | ^~~~~~~~~~~~~ sbin/fsck_msdosfs/dir.c:467:39: 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] 467 | static const u_char dotdot_name[11] = ".. "; | ^~~~~~~~~~~~~ MFC after: 3 days (cherry picked from commit 98c3d868fb5a7da7356c58e8c51423975bbd078b) --- sbin/fsck_msdosfs/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/fsck_msdosfs/dir.c b/sbin/fsck_msdosfs/dir.c index fbd1929f17f4..d4e9df8f05c8 100644 --- a/sbin/fsck_msdosfs/dir.c +++ b/sbin/fsck_msdosfs/dir.c @@ -450,8 +450,8 @@ checksize(struct fat_descriptor *fat, u_char *p, struct dosDirEntry *dir) return FSOK; } -static const u_char dot_name[11] = ". "; -static const u_char dotdot_name[11] = ".. "; +static const u_char dot_name[11] __nonstring = ". "; +static const u_char dotdot_name[11] __nonstring = ".. "; /* * Basic sanity check if the subdirectory have good '.' and '..' entries,home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?695272df.31f66.2bb34fce>
