diff mbox

[edk2,2/2] StdLib/LibC/Stdio: fix "missing braces around initializer"

Message ID 1406938797-25234-3-git-send-email-lersek@redhat.com
State Accepted
Commit 6f347d0f0a0db643c5ec134481aeab0232127ae2
Headers show

Commit Message

Laszlo Ersek Aug. 2, 2014, 12:19 a.m. UTC
The member "fext._ub" is a structure (of type "struct __sbuf"), and the
current initializer triggers

  StdLib/LibC/Stdio/vswscanf.c: In function 'vswscanf':
  StdLib/LibC/Stdio/vswscanf.c:75:10: error: missing braces around
                                      initializer [-Werror=missing-braces]
  StdLib/LibC/Stdio/vswscanf.c:75:10: error: (near initialization for
                                      'fext._ub') [-Werror=missing-braces]
  cc1: all warnings being treated as errors

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 StdLib/LibC/Stdio/vswscanf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/StdLib/LibC/Stdio/vswscanf.c b/StdLib/LibC/Stdio/vswscanf.c
index 3f62666..254f0b2 100644
--- a/StdLib/LibC/Stdio/vswscanf.c
+++ b/StdLib/LibC/Stdio/vswscanf.c
@@ -72,7 +72,7 @@  vswscanf(
   size_t mlen;
   int r;
   const wchar_t *rstr = str;
-  struct __sfileext fext = { 0 };
+  struct __sfileext fext = { { 0 } };
 
   /*
    * XXX Convert the wide character string to multibyte, which