summaryrefslogtreecommitdiff
path: root/AppPkg/Applications/Sockets
diff options
context:
space:
mode:
authorlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-17 23:45:45 +0000
committerlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-17 23:45:45 +0000
commit53c31c516489d4cd46d20d59a3705720be3443f1 (patch)
treefb25082296530930d1bc195b3f7d7c70eaa24a1d /AppPkg/Applications/Sockets
parent7700f0f5c0ab90bf052e33fa0ddd2f2aa7e7893e (diff)
downloadedk2-53c31c516489d4cd46d20d59a3705720be3443f1.zip
edk2-53c31c516489d4cd46d20d59a3705720be3443f1.tar.gz
edk2-53c31c516489d4cd46d20d59a3705720be3443f1.tar.bz2
Fix the errors detected by the GCC compiler:
* 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
Diffstat (limited to 'AppPkg/Applications/Sockets')
-rw-r--r--AppPkg/Applications/Sockets/DataSink/DataSink.c1
-rw-r--r--AppPkg/Applications/Sockets/DataSource/DataSource.c1
-rw-r--r--AppPkg/Applications/Sockets/GetNetByName/GetNetByName.c2
-rw-r--r--AppPkg/Applications/Sockets/WebServer/ACPI.c24
4 files changed, 15 insertions, 13 deletions
diff --git a/AppPkg/Applications/Sockets/DataSink/DataSink.c b/AppPkg/Applications/Sockets/DataSink/DataSink.c
index 05added..dcf4b59 100644
--- a/AppPkg/Applications/Sockets/DataSink/DataSink.c
+++ b/AppPkg/Applications/Sockets/DataSink/DataSink.c
@@ -834,6 +834,7 @@ SocketPoll (
@param [in] pContext Context for this routine
**/
VOID
+EFIAPI
TimerCallback (
IN EFI_EVENT Event,
IN VOID * pContext
diff --git a/AppPkg/Applications/Sockets/DataSource/DataSource.c b/AppPkg/Applications/Sockets/DataSource/DataSource.c
index 44605c8..6ca3b58 100644
--- a/AppPkg/Applications/Sockets/DataSource/DataSource.c
+++ b/AppPkg/Applications/Sockets/DataSource/DataSource.c
@@ -1318,6 +1318,7 @@ Tcp4Open (
@param [in] pContext Context for this routine
**/
VOID
+EFIAPI
TimerCallback (
IN EFI_EVENT Event,
IN VOID * pContext
diff --git a/AppPkg/Applications/Sockets/GetNetByName/GetNetByName.c b/AppPkg/Applications/Sockets/GetNetByName/GetNetByName.c
index be81b34..a77fefc 100644
--- a/AppPkg/Applications/Sockets/GetNetByName/GetNetByName.c
+++ b/AppPkg/Applications/Sockets/GetNetByName/GetNetByName.c
@@ -65,7 +65,7 @@ main (
Print ( L"ERROR - network not found, errno: %d\r\n", errno );
}
else {
- pIpAddress = (UINT8 *)pNetwork->n_net;
+ pIpAddress = (UINT8 *)(UINTN)&pNetwork->n_net;
Print ( L"%a: Type %d, %d.%d.%d.%d\r\n",
pNetwork->n_name,
pNetwork->n_addrtype,
diff --git a/AppPkg/Applications/Sockets/WebServer/ACPI.c b/AppPkg/Applications/Sockets/WebServer/ACPI.c
index 18321d2..7387439 100644
--- a/AppPkg/Applications/Sockets/WebServer/ACPI.c
+++ b/AppPkg/Applications/Sockets/WebServer/ACPI.c
@@ -180,14 +180,14 @@ LocateRsdt (
//
Status = EfiGetSystemConfigurationTable ( &gEfiAcpiTableGuid, (VOID **)&pRsdp30 );
if ( !EFI_ERROR ( Status )) {
- pRsdt = (ACPI_RSDT *)pRsdp30->RsdtAddress;
+ pRsdt = (ACPI_RSDT *)(UINTN)pRsdp30->RsdtAddress;
}
else {
Status = EfiGetSystemConfigurationTable (&gEfiAcpi10TableGuid, (VOID **)&pRsdp10b );
if ( EFI_ERROR ( Status )) {
break;
}
- pRsdt = (ACPI_RSDT *)pRsdp10b->RsdtAddress;
+ pRsdt = (ACPI_RSDT *)(UINTN)pRsdp10b->RsdtAddress;
}
break;
}
@@ -229,14 +229,14 @@ LocateTable (
//
Status = EfiGetSystemConfigurationTable ( &gEfiAcpiTableGuid, (VOID **)&pRsdp30 );
if ( !EFI_ERROR ( Status )) {
- pRsdt = (ACPI_RSDT *)pRsdp30->RsdtAddress;
+ pRsdt = (ACPI_RSDT *)(UINTN)pRsdp30->RsdtAddress;
}
else {
Status = EfiGetSystemConfigurationTable (&gEfiAcpi10TableGuid, (VOID **)&pRsdp10b );
if ( EFI_ERROR ( Status )) {
break;
}
- pRsdt = (ACPI_RSDT *)pRsdp10b->RsdtAddress;
+ pRsdt = (ACPI_RSDT *)(UINTN)pRsdp10b->RsdtAddress;
}
//
@@ -249,9 +249,9 @@ LocateTable (
// The entry is actually a 32-bit physical table address
// The first entry in the table is the 32-bit table signature
//
- pSignature = (UINT32 *)*pEntry;
+ pSignature = (UINT32 *)(UINTN)*pEntry;
if ( *pSignature == Signature ) {
- return (CONST VOID *) *pEntry;
+ return (CONST VOID *)(UINTN)*pEntry;
}
//
@@ -1082,7 +1082,7 @@ AcpiFadtPage (
Status = RowPointer ( SocketFD,
pPort,
"FIRMWARE_CTRL",
- (CONST VOID *)pFadt->FirmwareCtrl,
+ (CONST VOID *)(UINTN)pFadt->FirmwareCtrl,
NULL );
if ( EFI_ERROR ( Status )) {
break;
@@ -1090,7 +1090,7 @@ AcpiFadtPage (
Status = RowPointer ( SocketFD,
pPort,
"DSDT",
- (CONST VOID *)pFadt->DSDT,
+ (CONST VOID *)(UINTN)pFadt->DSDT,
( pFadt->DSDT == pFadt->XDsdt ) ? PAGE_ACPI_DSDT : NULL );
if ( EFI_ERROR ( Status )) {
break;
@@ -1593,7 +1593,7 @@ AcpiRsdp10Page (
Status = RowPointer ( SocketFD,
pPort,
"RsdtAddress",
- (VOID *)pRsdp10b->RsdtAddress,
+ (VOID *)(UINTN)pRsdp10b->RsdtAddress,
PAGE_ACPI_RSDT );
if ( EFI_ERROR ( Status )) {
break;
@@ -1696,7 +1696,7 @@ AcpiRsdp30Page (
Status = RowPointer ( SocketFD,
pPort,
"RsdtAddress",
- (VOID *)pRsdp30->RsdtAddress,
+ (VOID *)(UINTN)pRsdp30->RsdtAddress,
PAGE_ACPI_RSDT );
if ( EFI_ERROR ( Status )) {
break;
@@ -1881,7 +1881,7 @@ AcpiRsdtPage (
// The entry is actually a 32-bit physical table address
// The first entry in the table is the 32-bit table signature
//
- TableName[ 0 ] = *(UINT32 *)*pEntry;
+ TableName[ 0 ] = *(UINT32 *)(UINTN)*pEntry;
pWebPage = SignatureLookup ( &TableName[ 0 ], &pTableName );
//
@@ -1890,7 +1890,7 @@ AcpiRsdtPage (
Status = RowPointer ( SocketFD,
pPort,
pTableName,
- (VOID *)*pEntry,
+ (VOID *)(UINTN)*pEntry,
pWebPage );
if ( EFI_ERROR ( Status )) {
break;