Date: Fri, 24 Apr 2026 15:29:17 +0000 From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 441beb326fbf - stable/15 - netbsd-tests t_regex_att: Use __nonstring for a non-string constant Message-ID: <69eb8c4d.35b8f.d06e3e2@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=441beb326fbf62a36f129a0766fa6b8d4cf994a1 commit 441beb326fbf62a36f129a0766fa6b8d4cf994a1 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2026-01-27 18:38:31 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2026-04-24 15:26:39 +0000 netbsd-tests t_regex_att: Use __nonstring for a non-string constant Fixes the following warning from GCC 15: contrib/netbsd-tests/lib/libc/regex/t_regex_att.c:54:30: error: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (4 chars into 3 available) [-Werror=unterminated-string-initialization] 54 | static const char delim[3] = "\\\\\0"; | ^~~~~~~~ Reviewed by: ngie, imp, dim Differential Revision: https://reviews.freebsd.org/D54866 (cherry picked from commit 2dea50a661b903513efc42e270c4e6f5c2b89bc3) --- contrib/netbsd-tests/lib/libc/regex/t_regex_att.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c b/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c index dd5b818a1ef3..7962b1914f79 100644 --- a/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c +++ b/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c @@ -51,7 +51,7 @@ __RCSID("$NetBSD: t_regex_att.c,v 1.3 2017/01/14 20:59:23 christos Exp $"); #include <vis.h> static const char sep[] = "\r\n\t"; -static const char delim[3] = "\\\\\0"; +static const char delim[3] __nonstring = "\\\\\0"; static voidhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69eb8c4d.35b8f.d06e3e2>
