]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix the errors detected by the GCC compiler:
authorlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 17 Feb 2012 23:45:45 +0000 (23:45 +0000)
committerlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 17 Feb 2012 23:45:45 +0000 (23:45 +0000)
* Add EFIAPI to the timer callbacks
* Fix 32-bit pointer casts

Signed-off-by: lpleahy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13024 6f19259b-4bc3-4df7-8a09-765794883524

AppPkg/Applications/Sockets/DataSink/DataSink.c
AppPkg/Applications/Sockets/DataSource/DataSource.c
AppPkg/Applications/Sockets/GetNetByName/GetNetByName.c
AppPkg/Applications/Sockets/WebServer/ACPI.c

index 05added9c2d550f1aced1841e8e1bf37c886d03b..dcf4b59f303436c2d7b649526f0307d537a38877 100644 (file)
@@ -834,6 +834,7 @@ SocketPoll (
   @param [in] pContext  Context for this routine\r
 **/\r
 VOID\r
+EFIAPI\r
 TimerCallback (\r
   IN EFI_EVENT Event,\r
   IN VOID * pContext\r
index 44605c86e24875b2cc2eedbb1014c6d3c587a9dc..6ca3b587e01237b8f25f9084de22eea1b6fbbca8 100644 (file)
@@ -1318,6 +1318,7 @@ Tcp4Open (
   @param [in] pContext  Context for this routine\r
 **/\r
 VOID\r
+EFIAPI\r
 TimerCallback (\r
   IN EFI_EVENT Event,\r
   IN VOID * pContext\r
index be81b3483d26612fdfb3f6ca34689fd21712f77d..a77fefce10f8bf8329d5a3ed1823d45b240e5ef6 100644 (file)
@@ -65,7 +65,7 @@ main (
       Print ( L"ERROR - network not found, errno: %d\r\n", errno );\r
     }\r
     else {\r
-      pIpAddress = (UINT8 *)pNetwork->n_net;\r
+      pIpAddress = (UINT8 *)(UINTN)&pNetwork->n_net;\r
       Print ( L"%a: Type %d, %d.%d.%d.%d\r\n",\r
               pNetwork->n_name,\r
               pNetwork->n_addrtype,\r
index 18321d2b1289145a06d4b9efa07fab30b87b47da..7387439f59d2f9b2846d0e94bb9b55428a5b7814 100644 (file)
@@ -180,14 +180,14 @@ LocateRsdt (
     //\r
     Status = EfiGetSystemConfigurationTable ( &gEfiAcpiTableGuid, (VOID **)&pRsdp30 );\r
     if ( !EFI_ERROR ( Status )) {\r
-      pRsdt = (ACPI_RSDT *)pRsdp30->RsdtAddress;\r
+      pRsdt = (ACPI_RSDT *)(UINTN)pRsdp30->RsdtAddress;\r
     }\r
     else {\r
       Status = EfiGetSystemConfigurationTable (&gEfiAcpi10TableGuid, (VOID **)&pRsdp10b );\r
       if ( EFI_ERROR ( Status )) {\r
         break;\r
       }\r
-      pRsdt = (ACPI_RSDT *)pRsdp10b->RsdtAddress;\r
+      pRsdt = (ACPI_RSDT *)(UINTN)pRsdp10b->RsdtAddress;\r
     }\r
     break;\r
   }\r
@@ -229,14 +229,14 @@ LocateTable (
     //\r
     Status = EfiGetSystemConfigurationTable ( &gEfiAcpiTableGuid, (VOID **)&pRsdp30 );\r
     if ( !EFI_ERROR ( Status )) {\r
-      pRsdt = (ACPI_RSDT *)pRsdp30->RsdtAddress;\r
+      pRsdt = (ACPI_RSDT *)(UINTN)pRsdp30->RsdtAddress;\r
     }\r
     else {\r
       Status = EfiGetSystemConfigurationTable (&gEfiAcpi10TableGuid, (VOID **)&pRsdp10b );\r
       if ( EFI_ERROR ( Status )) {\r
         break;\r
       }\r
-      pRsdt = (ACPI_RSDT *)pRsdp10b->RsdtAddress;\r
+      pRsdt = (ACPI_RSDT *)(UINTN)pRsdp10b->RsdtAddress;\r
     }\r
 \r
     //\r
@@ -249,9 +249,9 @@ LocateTable (
       //  The entry is actually a 32-bit physical table address\r
       //  The first entry in the table is the 32-bit table signature\r
       //\r
-      pSignature = (UINT32 *)*pEntry;\r
+      pSignature = (UINT32 *)(UINTN)*pEntry;\r
       if ( *pSignature == Signature ) {\r
-        return (CONST VOID *) *pEntry;\r
+        return (CONST VOID *)(UINTN)*pEntry;\r
       }\r
 \r
       //\r
@@ -1082,7 +1082,7 @@ AcpiFadtPage (
     Status = RowPointer ( SocketFD,\r
                           pPort,\r
                           "FIRMWARE_CTRL",\r
-                          (CONST VOID *)pFadt->FirmwareCtrl,\r
+                          (CONST VOID *)(UINTN)pFadt->FirmwareCtrl,\r
                           NULL );\r
     if ( EFI_ERROR ( Status )) {\r
       break;\r
@@ -1090,7 +1090,7 @@ AcpiFadtPage (
     Status = RowPointer ( SocketFD,\r
                           pPort,\r
                           "DSDT",\r
-                          (CONST VOID *)pFadt->DSDT,\r
+                          (CONST VOID *)(UINTN)pFadt->DSDT,\r
                           ( pFadt->DSDT == pFadt->XDsdt ) ? PAGE_ACPI_DSDT : NULL );\r
     if ( EFI_ERROR ( Status )) {\r
       break;\r
@@ -1593,7 +1593,7 @@ AcpiRsdp10Page (
     Status = RowPointer ( SocketFD,\r
                           pPort,\r
                           "RsdtAddress",\r
-                          (VOID *)pRsdp10b->RsdtAddress,\r
+                          (VOID *)(UINTN)pRsdp10b->RsdtAddress,\r
                           PAGE_ACPI_RSDT );\r
     if ( EFI_ERROR ( Status )) {\r
       break;\r
@@ -1696,7 +1696,7 @@ AcpiRsdp30Page (
     Status = RowPointer ( SocketFD,\r
                           pPort,\r
                           "RsdtAddress",\r
-                          (VOID *)pRsdp30->RsdtAddress,\r
+                          (VOID *)(UINTN)pRsdp30->RsdtAddress,\r
                           PAGE_ACPI_RSDT );\r
     if ( EFI_ERROR ( Status )) {\r
       break;\r
@@ -1881,7 +1881,7 @@ AcpiRsdtPage (
       //  The entry is actually a 32-bit physical table address\r
       //  The first entry in the table is the 32-bit table signature\r
       //\r
-      TableName[ 0 ] = *(UINT32 *)*pEntry;\r
+      TableName[ 0 ] = *(UINT32 *)(UINTN)*pEntry;\r
       pWebPage = SignatureLookup ( &TableName[ 0 ], &pTableName );\r
 \r
       //\r
@@ -1890,7 +1890,7 @@ AcpiRsdtPage (
       Status = RowPointer ( SocketFD,\r
                             pPort,\r
                             pTableName,\r
-                            (VOID *)*pEntry,\r
+                            (VOID *)(UINTN)*pEntry,\r
                             pWebPage );\r
       if ( EFI_ERROR ( Status )) {\r
         break;\r