]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg/acpi: Code cleanup to pass static code checker
authorRuiyu Ni <ruiyu.ni@intel.com>
Fri, 3 Aug 2018 02:46:34 +0000 (10:46 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Mon, 6 Aug 2018 02:12:14 +0000 (10:12 +0800)
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Hao Wu <Hao.a.wu@intel.com>
ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c
ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c
ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c

index 18c4983e9524f4d48502bd9c3260deaba1f35edf..5cab20023dcdbdd71f27de5a12b4591f1369d753 100644 (file)
@@ -297,7 +297,7 @@ DumpUint64 (
   Val = *(UINT32*)(Ptr + sizeof (UINT32));\r
 \r
   Val <<= 32;\r
-  Val |= *(UINT32*)Ptr;\r
+  Val |= (UINT64)*(UINT32*)Ptr;\r
 \r
   Print (Format, Val);\r
 }\r
index 47ce93f104b024540b3140e3acd92b8a1dccccb1..4199e82ab1e61d6791feef06958e7b903f1c2f6f 100644 (file)
@@ -284,6 +284,7 @@ ConvertStrToAcpiSignature (
   UINT8 Index;\r
   CHAR8 Ptr[4];\r
 \r
+  ZeroMem (Ptr, sizeof (Ptr));\r
   Index = 0;\r
 \r
   // Convert to Upper case and convert to ASCII\r
index 245700a2534552d9786ecb109dc1b3c9fa793495..c6eb7087cfdde2db6a0298b508c751110a061677 100644 (file)
@@ -118,7 +118,7 @@ UefiShellAcpiViewCommandLibConstructor (
   gShellAcpiViewHiiHandle = NULL;\r
 \r
   // Check Shell Profile Debug1 bit of the profiles mask\r
-  if ((FixedPcdGet8 (PcdShellProfileMask) & BIT1) == 0) {\r
+  if ((PcdGet8 (PcdShellProfileMask) & BIT1) == 0) {\r
     return EFI_SUCCESS;\r
   }\r
 \r