diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2016-05-03 11:05:36 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2016-05-04 08:47:44 +0800 |
commit | 8e8fd303778822f21a9b6c6a5f59e8213a090fe4 (patch) | |
tree | a3249cd80305126841a8f2f7b6c8701d71ff6001 /OvmfPkg/Library | |
parent | 817fb3ac2a781d4732d240ad69fb3fb9d44b0e29 (diff) | |
download | edk2-8e8fd303778822f21a9b6c6a5f59e8213a090fe4.tar.gz edk2-8e8fd303778822f21a9b6c6a5f59e8213a090fe4.tar.bz2 edk2-8e8fd303778822f21a9b6c6a5f59e8213a090fe4.zip |
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>
Diffstat (limited to 'OvmfPkg/Library')
-rw-r--r-- | OvmfPkg/Library/PlatformBootManagerLib/QuietBoot.c | 2 |
1 files changed, 2 insertions, 0 deletions
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;
|