ShellPkg/UefiShellAcpiViewCommandLib: Initialize local variables

At latest edk2 version, there is build failure when building ShellPkg
with VS2012x86, which results from uninitialized local variables.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
This commit is contained in:
Shenglei Zhang
2019-08-15 13:35:42 +08:00
committed by Liming Gao
parent 8906f076de
commit 0154e02dc7
2 changed files with 18 additions and 0 deletions

View File

@ -121,6 +121,10 @@ VerifyChecksum (
UINT8 Checksum;
UINTN OriginalAttribute;
//
// set local variables to suppress incorrect compiler/analyzer warnings
//
OriginalAttribute = 0;
ByteCount = 0;
Checksum = 0;
@ -472,6 +476,10 @@ ParseAcpi (
BOOLEAN HighLight;
UINTN OriginalAttribute;
//
// set local variables to suppress incorrect compiler/analyzer warnings
//
OriginalAttribute = 0;
Offset = 0;
// Increment the Indent