]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg/UefiShellAcpiViewCommandLib: Fix GCC build failure
authorDandan Bi <dandan.bi@intel.com>
Mon, 30 Jul 2018 01:59:47 +0000 (09:59 +0800)
committerEric Dong <eric.dong@intel.com>
Wed, 1 Aug 2018 01:00:41 +0000 (09:00 +0800)
Fix following GCC build issues:
1.
xxx/SratParser.c:127:47: error:
initialization from incompatible pointer type
[-Werror=incompatible-pointer-types]
{L"Proximity Domain [31:8]", 3, 9, L"0x%x", DumpSratApicProximity,
                                            ^
xxx/SratParser.c:127:47: note:
(near initialization for 'SratApciSapicAffinityParser[6].PrintFormatter')

2.
xxx\UefiShellAcpiViewCommandLib.c:66:14:
error: 'Status' may be used uninitialized in this fu
nction [-Werror=maybe-uninitialized]
   EFI_STATUS Status;
              ^

cc: Alexei Fedorov <Alexei.Fedorov@arm.com>
cc: Ruiyu Ni <ruiyu.ni@intel.com>
cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c
ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c

index 043277aabf8d08f0999734959864ff1e94a1d7cc..e3f5567bece307d438d1a0793aa9755a70a1cbeb 100644 (file)
@@ -48,6 +48,7 @@ ValidateSratReserved (
 **/\r
 STATIC\r
 VOID\r
+EFIAPI\r
 DumpSratApicProximity (\r
   IN  CONST CHAR16*  Format,\r
   IN  UINT8*         Ptr\r
@@ -172,6 +173,7 @@ ValidateSratReserved (
 **/\r
 STATIC\r
 VOID\r
+EFIAPI\r
 DumpSratApicProximity (\r
  IN CONST CHAR16* Format,\r
  IN UINT8*        Ptr\r
index c2f40009eeb9b3ac401b481b283f5803797e8261..245700a2534552d9786ecb109dc1b3c9fa793495 100644 (file)
@@ -66,6 +66,7 @@ RegisterAllParsers (
   EFI_STATUS Status;\r
   UINTN Count;\r
 \r
+  Status = EFI_SUCCESS;\r
   Count = sizeof (ParserList) / sizeof (ParserList[0]);\r
 \r
   while (Count-- != 0) {\r