summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.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/AcpiView.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/AcpiView.c')
-rw-r--r--ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c
index 9feb2df207..de0851dd5f 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c
@@ -211,6 +211,10 @@ ProcessTableReportOptions (
BOOLEAN Log;
BOOLEAN HighLight;
+ //
+ // set local variables to suppress incorrect compiler/analyzer warnings
+ //
+ OriginalAttribute = 0;
SignaturePtr = (UINT8*)(UINTN)&Signature;
Log = FALSE;
HighLight = GetColourHighlighting ();
@@ -347,6 +351,12 @@ AcpiView (
PARSE_ACPI_TABLE_PROC RsdpParserProc;
BOOLEAN Trace;
+ //
+ // set local variables to suppress incorrect compiler/analyzer warnings
+ //
+ EfiConfigurationTable = NULL;
+ OriginalAttribute = 0;
+
// Search the table for an entry that matches the ACPI Table Guid
FoundAcpiTable = FALSE;
for (Index = 0; Index < SystemTable->NumberOfTableEntries; Index++) {