aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2026-01-27 18:38:31 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2026-01-27 18:38:31 +0000
commit2dea50a661b903513efc42e270c4e6f5c2b89bc3 (patch)
treee237a4e4bacf93c2209804e9541ba5db782ca302
parentbfc6e56f6327621171cef4fe29290c63edfc4d9c (diff)
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
-rw-r--r--contrib/netbsd-tests/lib/libc/regex/t_regex_att.c2
1 files changed, 1 insertions, 1 deletions
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 void