From 543431e2b205239fca5274b7c2593fbb806fbb09 Mon Sep 17 00:00:00 2001
From: graham sanderson <graham.sanderson@raspberrypi.com>
Date: Tue, 12 Jul 2022 11:22:49 -0500
Subject: [PATCH] initialization of single field in struct was causing memset
 of whole struct

---
 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 52a1c0c..d49c0ca 100644
--- a/src/rp2_common/pico_stdio/stdio.c
+++ b/src/rp2_common/pico_stdio/stdio.c
@@ -241,7 +241,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();
-- 
GitLab