public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Gary Lin <glin@suse.com>
To: edk2-devel@lists.01.org
Cc: David Wei <david.wei@intel.com>
Subject: [PATCH 1/4] Vlv2TbltDevicePkg/FspSupport: Fix GCC build errors
Date: Thu, 11 Aug 2016 16:38:17 +0800	[thread overview]
Message-ID: <20160811083820.27055-2-glin@suse.com> (raw)
In-Reply-To: <20160811083820.27055-1-glin@suse.com>

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>
---
 .../Library/PeiFspHobProcessLibVlv2/FspHobProcessLibVlv2.c          | 5 ++---
 .../FspSupport/Library/SecFspPlatformSecLibVlv2/PlatformInit.c      | 4 ++--
 .../FspSupport/Library/SecFspPlatformSecLibVlv2/UartInit.c          | 6 +++---
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobProcessLibVlv2.c b/Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobProcessLibVlv2.c
index f0b68cd..c308698 100644
--- a/Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobProcessLibVlv2.c
+++ b/Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobProcessLibVlv2.c
@@ -49,14 +49,13 @@ GetMemorySizeInMemoryTypeInformation (
   IN EFI_PEI_SERVICES **PeiServices
   )
 {
-  EFI_STATUS                  Status;
   EFI_PEI_HOB_POINTERS        Hob;
   EFI_MEMORY_TYPE_INFORMATION *MemoryData;
   UINT8                       Index;
   UINTN                       TempPageNum;
 
   MemoryData = NULL;
-  Status     = (*PeiServices)->GetHobList (PeiServices, (VOID **) &Hob.Raw);
+  (*PeiServices)->GetHobList ((CONST EFI_PEI_SERVICES **)PeiServices, (VOID **) &Hob.Raw);
   while (!END_OF_HOB_LIST (Hob)) {
     if (Hob.Header->HobType == EFI_HOB_TYPE_GUID_EXTENSION &&
       CompareGuid (&Hob.Guid->Name, &gEfiMemoryTypeInformationGuid)) {
@@ -398,7 +397,7 @@ FspHobProcessForOtherData (
   //
   // Other hob for platform
   //
-  PlatformHobCreateFromFsp ( PeiServices,  FspHobList);
+  PlatformHobCreateFromFsp ((CONST EFI_PEI_SERVICES **) PeiServices,  FspHobList);
 
   return EFI_SUCCESS;
 }
diff --git a/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/PlatformInit.c b/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/PlatformInit.c
index 2e181ac..c54b8af 100644
--- a/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/PlatformInit.c
+++ b/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/PlatformInit.c
@@ -15,8 +15,8 @@
 
 
 #include <PiPei.h>
-#include <Library\DebugLib.h>
-#include <Library\SerialPortLib.h>
+#include <Library/DebugLib.h>
+#include <Library/SerialPortLib.h>
 
 VOID EnableInternalUart ();
 
diff --git a/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/UartInit.c b/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/UartInit.c
index 4255ad3..c3ba557 100644
--- a/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/UartInit.c
+++ b/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/UartInit.c
@@ -15,8 +15,8 @@
 
 
 #include <PiPei.h>
-#include <Library\IoLib.h>
-#include <Library\SerialPortLib.h>
+#include <Library/IoLib.h>
+#include <Library/SerialPortLib.h>
 
 #define PCI_IDX        0xCF8
 #define PCI_DAT        0xCFC
@@ -192,7 +192,7 @@ EnableInternalUart(
   MmioOr8 (PciD31F0RegBase + R_PCH_LPC_UART_CTRL, (UINT8) B_PCH_LPC_UART_CTRL_COM1_EN);
 
   SerialPortInitialize ();
-  SerialPortWrite ("EnableInternalUart!\r\n", sizeof("EnableInternalUart!\r\n") - 1);
+  SerialPortWrite ((UINT8 *)"EnableInternalUart!\r\n", sizeof("EnableInternalUart!\r\n") - 1);
 
   return  ;
 }
-- 
2.9.2



  reply	other threads:[~2016-08-11  8:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-11  8:38 [PATCH 0/4] Fix GCC Minnowboard FSP build Gary Lin
2016-08-11  8:38 ` Gary Lin [this message]
2016-08-12  6:59   ` [PATCH 1/4] Vlv2TbltDevicePkg/FspSupport: Fix GCC build errors Wei, David
2016-08-11  8:38 ` [PATCH 2/4] Vlv2TbltDevicePkg/SecFspPlatformSecLibVlv2: Add assembly code for GCC Gary Lin
2016-08-11  8:38 ` [PATCH 3/4] Vlv2TbltDevicePkg/PlatformFspLib: Fix the include path Gary Lin
2016-08-12  6:55   ` Wei, David
2016-08-11  8:38 ` [PATCH 4/4] Vlv2TbltDevicePkg: Add RAW file type to Rule.Common.SEC.BINARY Gary Lin
2016-08-12  7:00   ` Wei, David

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160811083820.27055-2-glin@suse.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox