git: 667259b392ec - main - ncurses: avoid warnings about too-long initializer strings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 30 Dec 2025 12:49:36 UTC
The branch main has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=667259b392ec0a86d066ccc6ba0f4025b3d2a083
commit 667259b392ec0a86d066ccc6ba0f4025b3d2a083
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2025-12-30 12:48:07 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2025-12-30 12:48:56 +0000
ncurses: avoid warnings about too-long initializer strings
Increase the size of `assoc::from` to 8 bytes, to avoid warnings from
clang 21 similar to:
contrib/ncurses/progs/infocmp.c:702:10: error: initializer-string for character array is too long, array size is 4 but initializer has size 5 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
702 | DATA("\033[2J", "ED2"), /* clear page */
| ^~~~~~~~~
contrib/ncurses/progs/infocmp.c:716:10: error: initializer-string for character array is too long, array size is 4 but initializer has size 5 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
716 | DATA("\033[!p", "DECSTR"), /* soft reset */
| ^~~~~~~~~
Reviewed by: markj
Obtained from: https://invisible-island.net/archives/ncurses/6.5/ncurses-6.5-20241207.patch.gz
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54371
---
contrib/ncurses/progs/infocmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/ncurses/progs/infocmp.c b/contrib/ncurses/progs/infocmp.c
index 7932203ac2b1..f61633cfad80 100644
--- a/contrib/ncurses/progs/infocmp.c
+++ b/contrib/ncurses/progs/infocmp.c
@@ -687,7 +687,7 @@ compare_predicate(PredType type, PredIdx idx, const char *name)
#define DATAX() DATA("", "")
typedef struct {
- const char from[4];
+ const char from[8];
const char to[12];
} assoc;