From 00e1809a223037c0a4bf6e34e68014982b8b6a1d Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Wed, 31 Jan 2024 03:19:41 -0500 Subject: remove initialization of (possibly) VLA --- src/stdio/__printf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/stdio/__printf.c') diff --git a/src/stdio/__printf.c b/src/stdio/__printf.c index 74499cae..72eb1585 100644 --- a/src/stdio/__printf.c +++ b/src/stdio/__printf.c @@ -1,6 +1,8 @@ #include #include #include +#include +#include #ifdef _POSIX_SOURCE #include @@ -270,7 +272,8 @@ int (__printf)(struct io_options *opt, const char * format, va_list arg) } else if (length == l) { #if defined __STDC_VERSION__ wint_t wc = va_arg(arg, wint_t); - char mb[MB_CUR_MAX + 1] = "WC"; + char mb[MB_CUR_MAX + 1]; + mb[0] = 'W'; mb[1] = 'C'; mb[2] = '\0'; wctomb(mb, wc); nout = __append(s, mb, nout, n); #else -- cgit v1.2.1