Date: Mon, 29 Dec 2025 12:24:05 +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: d8c35dc1df47 - stable/13 - sys/font.h: avoid warnings about too-long initializer strings Message-ID: <695272e5.31f6a.15e0371b@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=d8c35dc1df476a6fe4666f6dbbb9d6c540eb2423 commit d8c35dc1df476a6fe4666f6dbbb9d6c540eb2423 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2025-12-26 14:31:43 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2025-12-29 12:23:01 +0000 sys/font.h: avoid warnings about too-long initializer strings Mark `font_header::fh_magic` as `__non_string`, to avoid a warning from clang 21 similar to: /usr/src/usr.bin/vtfontcvt/vtfontcvt.c:763:15: error: initializer-string for character array is too long, array size is 8 but initializer has size 9 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization] 763 | .fh_magic = FONT_HEADER_MAGIC, | ^~~~~~~~~~~~~~~~~ /usr/obj/usr/src/amd64.amd64/tmp/usr/include/sys/font.h:109:27: note: expanded from macro 'FONT_HEADER_MAGIC' 109 | #define FONT_HEADER_MAGIC "VFNT0002" | ^~~~~~~~~~ MFC after: 3 days (cherry picked from commit e2c93ed09f259ed049923bdaa9b697b3586e2f1a) --- sys/sys/font.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/font.h b/sys/sys/font.h index fb5fbbc9e557..d486dbc3a011 100644 --- a/sys/sys/font.h +++ b/sys/sys/font.h @@ -108,7 +108,7 @@ typedef STAILQ_HEAD(font_list, fontlist) font_list_t; #define FONT_HEADER_MAGIC "VFNT0002" struct font_header { - uint8_t fh_magic[8]; + uint8_t fh_magic[8] __nonstring; uint8_t fh_width; uint8_t fh_height; uint16_t fh_pad;home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?695272e5.31f6a.15e0371b>
