git: 66b5d1ffadb6 - stable/15 - libthr: fix -Wunterminated-string-initialization

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 24 Apr 2026 15:29:28 UTC
The branch stable/15 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=66b5d1ffadb6d9254b16aaad1a928480333dcb74

commit 66b5d1ffadb6d9254b16aaad1a928480333dcb74
Author:     Alex Richardson <arichardson@FreeBSD.org>
AuthorDate: 2025-12-16 18:04:18 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-04-24 15:26:39 +0000

    libthr: fix -Wunterminated-string-initialization
    
    Reviewed by:    jhb, emaste
    MFC after:      1 week
    Differential Revision: https://reviews.freebsd.org/D52528
    
    (cherry picked from commit 4cfc7de13f110563463c15be99690c6fe7b8676a)
---
 lib/libthr/thread/thr_printf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/libthr/thread/thr_printf.c b/lib/libthr/thread/thr_printf.c
index e1edffe5acb2..b7cb6ce81bda 100644
--- a/lib/libthr/thread/thr_printf.c
+++ b/lib/libthr/thread/thr_printf.c
@@ -61,7 +61,7 @@ _thread_printf(int fd, const char *fmt, ...)
 void
 _thread_vprintf(int fd, const char *fmt, va_list ap)
 {
-	static const char digits[16] = "0123456789abcdef";
+	static const char digits[16] __nonstring = "0123456789abcdef";
 	char buf[20];
 	char *s;
 	unsigned long r, u;
@@ -147,4 +147,3 @@ pstr(int fd, const char *s)
 
 	__sys_write(fd, s, strlen(s));
 }
-