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.fedo...@arm.com>
cc: Ruiyu Ni <ruiyu...@intel.com>
cc: Jaben Carsey <jaben.car...@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan...@intel.com>
---
 ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c  | 2 ++
 .../Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c   | 1 +
 2 files changed, 3 insertions(+)

diff --git 
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c
index 043277aabf..e3f5567bec 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c
@@ -46,10 +46,11 @@ ValidateSratReserved (
   @param [in] Format  Format string for tracing the data.
   @param [in] Ptr     Pointer to the start of the buffer.
 **/
 STATIC
 VOID
+EFIAPI
 DumpSratApicProximity (
   IN  CONST CHAR16*  Format,
   IN  UINT8*         Ptr
   );
 
@@ -170,10 +171,11 @@ ValidateSratReserved (
   @param [in] Format  Format string for tracing the data.
   @param [in] Ptr     Pointer to the start of the buffer.
 **/
 STATIC
 VOID
+EFIAPI
 DumpSratApicProximity (
  IN CONST CHAR16* Format,
  IN UINT8*        Ptr
  )
 {
diff --git 
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c
index c2f40009ee..245700a253 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c
@@ -64,10 +64,11 @@ RegisterAllParsers (
   )
 {
   EFI_STATUS Status;
   UINTN Count;
 
+  Status = EFI_SUCCESS;
   Count = sizeof (ParserList) / sizeof (ParserList[0]);
 
   while (Count-- != 0) {
     Status = RegisterParser (
                ParserList[Count].Signature,
-- 
2.14.3.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to