From: Ruiyu Ni Date: Fri, 3 Aug 2018 02:46:34 +0000 (+0800) Subject: ShellPkg/acpi: Code cleanup to pass static code checker X-Git-Tag: edk2-stable201903~1262 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=81038d50c9c9bbe5756d6ba172d692d0c7b58a62 ShellPkg/acpi: Code cleanup to pass static code checker Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Reviewed-by: Hao Wu --- diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c index 18c4983e95..5cab20023d 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c @@ -297,7 +297,7 @@ DumpUint64 ( Val = *(UINT32*)(Ptr + sizeof (UINT32)); Val <<= 32; - Val |= *(UINT32*)Ptr; + Val |= (UINT64)*(UINT32*)Ptr; Print (Format, Val); } diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c index 47ce93f104..4199e82ab1 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c @@ -284,6 +284,7 @@ ConvertStrToAcpiSignature ( UINT8 Index; CHAR8 Ptr[4]; + ZeroMem (Ptr, sizeof (Ptr)); Index = 0; // Convert to Upper case and convert to ASCII diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c index 245700a253..c6eb7087cf 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c @@ -118,7 +118,7 @@ UefiShellAcpiViewCommandLibConstructor ( gShellAcpiViewHiiHandle = NULL; // Check Shell Profile Debug1 bit of the profiles mask - if ((FixedPcdGet8 (PcdShellProfileMask) & BIT1) == 0) { + if ((PcdGet8 (PcdShellProfileMask) & BIT1) == 0) { return EFI_SUCCESS; }