From 0154e02dc702d0963904ac9e57efa9a644a212d5 Mon Sep 17 00:00:00 2001 From: Shenglei Zhang Date: Thu, 15 Aug 2019 13:35:42 +0800 Subject: 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 Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Shenglei Zhang Reviewed-by: Zhichao Gao --- ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c') 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 -- cgit v1.2.3