From 8e8fd303778822f21a9b6c6a5f59e8213a090fe4 Mon Sep 17 00:00:00 2001 From: Ruiyu Ni Date: Tue, 3 May 2016 11:05:36 +0800 Subject: [PATCH] OvmfPkg/PlatformBootManagerLib: Fix gcc-4.8 Ia32 build failure The Width and Height assignment suppresses an invalid gcc-4.8 warning on Ia32. These warnings look unjustified to me. Namely, near the beginning of the function, there is a while(1) loop. In that loop, ConvertBmpToGopBlt() is called unconditionally. If the call fails, the rest of the loop body is not reached (where the Height and Width variables are used -- the compiler warns about their use in the switch statement). If the call succeeds, then the variables are set. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Reviewed-by: Laszlo Ersek Tested-by: Laszlo Ersek --- OvmfPkg/Library/PlatformBootManagerLib/QuietBoot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OvmfPkg/Library/PlatformBootManagerLib/QuietBoot.c b/OvmfPkg/Library/PlatformBootManagerLib/QuietBoot.c index dd475adf3e..972050fa9c 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/QuietBoot.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/QuietBoot.c @@ -361,6 +361,8 @@ EnableQuietBoot ( NewHeight = 0; NewWidth = 0; Instance = 0; + Height = 0; + Width = 0; while (1) { ImageData = NULL; ImageSize = 0;