]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Vlv2TbltDevicePkg/FspSupport: Fix GCC build errors
authorWei, David <david.wei@intel.com>
Fri, 12 Aug 2016 06:59:35 +0000 (14:59 +0800)
committerdavid wei <david.wei@intel.com>
Wed, 17 Aug 2016 09:49:28 +0000 (17:49 +0800)
Reviewed-by: David Wei <david.wei@intel.com>
Thanks,
David  Wei

-----Original Message-----
From: Gary Lin [mailto:glin@suse.com]
Sent: Thursday, August 11, 2016 4:38 PM
To: edk2-devel@lists.01.org
Cc: Wei, David <david.wei@intel.com>
Subject: [PATCH 1/4] Vlv2TbltDevicePkg/FspSupport: Fix GCC build errors

Fix the errors from GCC:

Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobProcessLibVlv2.c: In function 'GetMemorySizeInMemoryTypeInformation':
Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobProcessLibVlv2.c:59:40: error: passing argument 1 of '(*PeiServices)->GetHobList' from incompatible pointer type [-Werror=incompatible-pointer-types]
Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobProcessLibVlv2.c:52:31: error: variable 'Status' set but not used [-Werror=unused-but-set-variable]

Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobProcessLibVlv2.c: In function 'FspHobProcessForOtherData':
Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobProcessLibVlv2.c:401:29: error: passing argument 1 of 'PlatformHobCreateFromFsp' from incompatible pointer type [-Werror=incompatible-pointer-types]

Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/PlatformInit.c:18:30: fatal error: Library\DebugLib.h: No such file or directory
Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/PlatformInit.c:19:35: fatal error: Library\SerialPortLib.h: No such file or directory

Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/UartInit.c:18:27: fatal error: Library\IoLib.h: No such file or directory
Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/UartInit.c:19:35: fatal error: Library\SerialPortLib.h: No such file or directory

Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/UartInit.c: In function 'EnableInternalUart':
Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/UartInit.c:195:20: error: pointer targets in passing argument 1 of 'SerialPortWrite' differ in signedness [-Werror=pointer-sign]

Cc: David Wei <david.wei@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobProcessLibVlv2.c
Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/PlatformInit.c
Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/UartInit.c

index f0b68cd7b2d6000341de9fd2b44de77fa9cf43db..c308698ab673b11d0fb7baf55f53a0dfa862d71a 100644 (file)
@@ -49,14 +49,13 @@ GetMemorySizeInMemoryTypeInformation (
   IN EFI_PEI_SERVICES **PeiServices\r
   )\r
 {\r
-  EFI_STATUS                  Status;\r
   EFI_PEI_HOB_POINTERS        Hob;\r
   EFI_MEMORY_TYPE_INFORMATION *MemoryData;\r
   UINT8                       Index;\r
   UINTN                       TempPageNum;\r
 \r
   MemoryData = NULL;\r
-  Status     = (*PeiServices)->GetHobList (PeiServices, (VOID **) &Hob.Raw);\r
+  (*PeiServices)->GetHobList ((CONST EFI_PEI_SERVICES **)PeiServices, (VOID **) &Hob.Raw);\r
   while (!END_OF_HOB_LIST (Hob)) {\r
     if (Hob.Header->HobType == EFI_HOB_TYPE_GUID_EXTENSION &&\r
       CompareGuid (&Hob.Guid->Name, &gEfiMemoryTypeInformationGuid)) {\r
@@ -398,7 +397,7 @@ FspHobProcessForOtherData (
   //\r
   // Other hob for platform\r
   //\r
-  PlatformHobCreateFromFsp ( PeiServices,  FspHobList);\r
+  PlatformHobCreateFromFsp ((CONST EFI_PEI_SERVICES **) PeiServices,  FspHobList);\r
 \r
   return EFI_SUCCESS;\r
 }\r
index 2e181ac5e0d69778b1ebc0924bf4105ce3e24117..c54b8aff82ee055ed3fcdd3a291ec7bffa70fd17 100644 (file)
@@ -15,8 +15,8 @@
 \r
 \r
 #include <PiPei.h>\r
-#include <Library\DebugLib.h>\r
-#include <Library\SerialPortLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/SerialPortLib.h>\r
 \r
 VOID EnableInternalUart ();\r
 \r
index 4255ad371288cc7c7883e39c17a1955c1c4962f8..c3ba557a74123a78f420d364c512e26dbafba5e0 100644 (file)
@@ -15,8 +15,8 @@
 \r
 \r
 #include <PiPei.h>\r
-#include <Library\IoLib.h>\r
-#include <Library\SerialPortLib.h>\r
+#include <Library/IoLib.h>\r
+#include <Library/SerialPortLib.h>\r
 \r
 #define PCI_IDX        0xCF8\r
 #define PCI_DAT        0xCFC\r
@@ -192,7 +192,7 @@ EnableInternalUart(
   MmioOr8 (PciD31F0RegBase + R_PCH_LPC_UART_CTRL, (UINT8) B_PCH_LPC_UART_CTRL_COM1_EN);\r
 \r
   SerialPortInitialize ();\r
-  SerialPortWrite ("EnableInternalUart!\r\n", sizeof("EnableInternalUart!\r\n") - 1);\r
+  SerialPortWrite ((UINT8 *)"EnableInternalUart!\r\n", sizeof("EnableInternalUart!\r\n") - 1);\r
 \r
   return  ;\r
 }\r