From 599aa11f870264f6d86f3e1451afb6de07be1758 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Mon, 11 Aug 2014 21:59:53 +0000 Subject: StdLib/LibC/gdtoa: fix "missing braces around initializer" The member "u.L" is an array, and the current initializer triggers StdLib/LibC/gdtoa/strtof.c: In function '_strtof': StdLib/LibC/gdtoa/strtof.c:53:9: error: missing braces around initializer [-Werror=missing-braces] StdLib/LibC/gdtoa/strtof.c:53:9: error: (near initialization for 'u.L') [-Werror=missing-braces] cc1: all warnings being treated as errors Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Jordan Justen git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15785 6f19259b-4bc3-4df7-8a09-765794883524 --- StdLib/LibC/gdtoa/strtof.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'StdLib') diff --git a/StdLib/LibC/gdtoa/strtof.c b/StdLib/LibC/gdtoa/strtof.c index 44a4cb3746..3b4b52cdc5 100644 --- a/StdLib/LibC/gdtoa/strtof.c +++ b/StdLib/LibC/gdtoa/strtof.c @@ -50,7 +50,7 @@ strtof(CONST char *s, char **sp) ULong bits[1]; Long expt; int k; - union { ULong L[1]; float f; } u = { 0 }; + union { ULong L[1]; float f; } u = { { 0 } }; k = strtodg(s, sp, &fpi, &expt, bits); if (k == STRTOG_NoMemory) { -- cgit v1.2.3