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 <ruiyu.ni@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Ruiyu Ni 2016-05-03 11:05:36 +08:00
parent 817fb3ac2a
commit 8e8fd30377
1 changed files with 2 additions and 0 deletions

View File

@ -361,6 +361,8 @@ EnableQuietBoot (
NewHeight = 0;
NewWidth = 0;
Instance = 0;
Height = 0;
Width = 0;
while (1) {
ImageData = NULL;
ImageSize = 0;