From 3ed9e2fb1e58013de96dba5ee22e45af67e70a50 Mon Sep 17 00:00:00 2001 From: Graham Sanderson Date: Mon, 26 Sep 2022 11:49:16 -0500 Subject: [PATCH] Avoid initializing full stdio_stack_buffer object with zeros (#992) --- src/rp2_common/pico_stdio/stdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rp2_common/pico_stdio/stdio.c b/src/rp2_common/pico_stdio/stdio.c index cce9de8..177f5c7 100644 --- a/src/rp2_common/pico_stdio/stdio.c +++ b/src/rp2_common/pico_stdio/stdio.c @@ -243,7 +243,8 @@ int WRAPPER_FUNC(vprintf)(const char *format, va_list va) { } int ret; #if LIB_PICO_PRINTF_PICO - struct stdio_stack_buffer buffer = {.used = 0}; + struct stdio_stack_buffer buffer; + buffer.used = 0; ret = vfctprintf(stdio_buffered_printer, &buffer, format, va); stdio_stack_buffer_flush(&buffer); stdio_flush();