summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c
diff options
context:
space:
mode:
authorShenglei Zhang <shenglei.zhang@intel.com>2019-08-15 13:35:42 +0800
committerLiming Gao <liming.gao@intel.com>2019-08-16 14:01:49 +0800
commit0154e02dc702d0963904ac9e57efa9a644a212d5 (patch)
treebe0b63fa6dafcc670eb24bb8613076d6daed07a9 /ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c
parent8906f076de35b222a7d62bcf6ed1a4a2498a5791 (diff)
downloadedk2-0154e02dc702d0963904ac9e57efa9a644a212d5.tar.gz
edk2-0154e02dc702d0963904ac9e57efa9a644a212d5.tar.bz2
edk2-0154e02dc702d0963904ac9e57efa9a644a212d5.zip
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>
Diffstat (limited to 'ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c')
-rw-r--r--ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c
index 2d6ff80e29..94bafa22ef 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c
@@ -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