Fix compilation errors detected with GCC 4.4

Signed-off-by: lpleahy

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12504 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lpleahy 2011-09-30 23:52:45 +00:00
parent 59bc059327
commit 58081f2c64
4 changed files with 37 additions and 34 deletions

View File

@ -204,7 +204,7 @@ EslIp4OptionGet (
break;
case IP_HDRINCL:
*ppOptionData = (void *)pSocket->bIncludeHeader;
*ppOptionData = (void *)&pSocket->bIncludeHeader;
*pOptionLength = sizeof ( pSocket->bIncludeHeader );
break;
}

View File

@ -23,6 +23,9 @@ The following issues exist with the EFI Socket Library:
* TCPv4 transfer rate is slow (< 10 Mbits/sec) - This is an unidentified issue.
* Tcp4Dxe transmits more urgent data than is sent through sockets when normal data is
queued for transmission before the urgent data. HSD 206365
* Raw socket applications are not able to pass the IP header as part of their
payload by using the IP option IP_HDRINCL. This is because the UEFI IPv4 driver
(Ip4Dxe) does not support RawData. HSD 206136

View File

@ -2307,7 +2307,7 @@ EslSocketIoInit (
IN ESL_IO_MGMT ** ppFreeQueue,
IN UINTN DebugFlags,
IN CHAR8 * pEventName,
IN EFI_EVENT_NOTIFY pfnCompletion
IN PFN_API_IO_COMPLETE pfnCompletion
)
{
ESL_IO_MGMT * pEnd;
@ -2670,7 +2670,7 @@ EslSocketOptionGet (
int errno;
socklen_t LengthInBytes;
socklen_t MaxBytes;
UINT8 * pOptionData;
CONST UINT8 * pOptionData;
ESL_SOCKET * pSocket;
EFI_STATUS Status;
@ -2709,7 +2709,7 @@ EslSocketOptionGet (
if ( pSocket->pApi->DefaultProtocol == level ) {
Status = pSocket->pApi->pfnOptionGet ( pSocket,
OptionName,
&pOptionData,
(CONST void ** __restrict)&pOptionData,
&LengthInBytes );
errno = pSocket->errno;
break;
@ -2749,7 +2749,7 @@ EslSocketOptionGet (
//
// Return the listen flag
//
pOptionData = (UINT8 *)&pSocket->bListenCalled;
pOptionData = (CONST UINT8 *)&pSocket->bListenCalled;
LengthInBytes = sizeof ( pSocket->bListenCalled );
break;
@ -2757,7 +2757,7 @@ EslSocketOptionGet (
//
// Return the debug flags
//
pOptionData = (UINT8 *)&pSocket->bOobInLine;
pOptionData = (CONST UINT8 *)&pSocket->bOobInLine;
LengthInBytes = sizeof ( pSocket->bOobInLine );
break;
@ -2765,7 +2765,7 @@ EslSocketOptionGet (
//
// Return the out-of-band inline flag
//
pOptionData = (UINT8 *)&pSocket->bOobInLine;
pOptionData = (CONST UINT8 *)&pSocket->bOobInLine;
LengthInBytes = sizeof ( pSocket->bOobInLine );
break;
@ -2773,7 +2773,7 @@ EslSocketOptionGet (
//
// Return the receive timeout
//
pOptionData = (UINT8 *)&pSocket->RxTimeout;
pOptionData = (CONST UINT8 *)&pSocket->RxTimeout;
LengthInBytes = sizeof ( pSocket->RxTimeout );
break;
@ -2781,7 +2781,7 @@ EslSocketOptionGet (
//
// Return the maximum receive buffer size
//
pOptionData = (UINT8 *)&pSocket->MaxRxBuf;
pOptionData = (CONST UINT8 *)&pSocket->MaxRxBuf;
LengthInBytes = sizeof ( pSocket->MaxRxBuf );
break;
@ -2789,7 +2789,7 @@ EslSocketOptionGet (
//
// Return the maximum transmit buffer size
//
pOptionData = (UINT8 *)&pSocket->MaxTxBuf;
pOptionData = (CONST UINT8 *)&pSocket->MaxTxBuf;
LengthInBytes = sizeof ( pSocket->MaxTxBuf );
break;
@ -2797,7 +2797,7 @@ EslSocketOptionGet (
//
// Return the socket type
//
pOptionData = (UINT8 *)&pSocket->Type;
pOptionData = (CONST UINT8 *)&pSocket->Type;
LengthInBytes = sizeof ( pSocket->Type );
break;
}

View File

@ -220,7 +220,7 @@ typedef struct _ESL_IO_MGMT {
EFI_UDP4_COMPLETION_TOKEN Udp4Rx; ///< UDP4 receive token
EFI_UDP4_COMPLETION_TOKEN Udp4Tx; ///< UDP4 transmit token
} Token; ///< Completion token for the network operation
};
} GCC_IO_MGMT;
/**
IP4 context structure
@ -480,6 +480,26 @@ EFI_STATUS
IN BOOLEAN bBindTest
);
/**
Process the completion event
This routine handles the I/O completion event.
This routine is called by the low level network driver when
the operation is completed.
@param [in] Event The receive completion event
@param [in] pIo The address of an ::ESL_IO_MGMT structure
**/
typedef
VOID
(* PFN_API_IO_COMPLETE) (
IN EFI_EVENT Event,
IN ESL_IO_MGMT * pIo
);
/**
Determine if the socket is configured.
@ -726,26 +746,6 @@ EFI_STATUS
IN socklen_t SockAddrLength
);
/**
Process the receive completion
This routine handles the receive completion event.
This routine is called by the low level network driver when
data is received.
@param [in] Event The receive completion event
@param [in] pIo The address of an ::ESL_IO_MGMT structure
**/
typedef
VOID
(* PFN_API_RX_COMPLETE) (
IN EFI_EVENT Event,
IN ESL_IO_MGMT * pIo
);
/**
Start a receive operation
@ -853,7 +853,7 @@ typedef struct {
PFN_API_RECEIVE pfnReceive; ///< Attempt to receive some data
PFN_API_REMOTE_ADDR_GET pfnRemoteAddrGet; ///< Get remote address
PFN_API_REMOTE_ADDR_SET pfnRemoteAddrSet; ///< Set the remote system address
PFN_API_RX_COMPLETE pfnRxComplete; ///< RX completion
PFN_API_IO_COMPLETE pfnRxComplete; ///< RX completion
PFN_API_RX_START pfnRxStart; ///< Start a network specific receive operation
PFN_API_TRANSMIT pfnTransmit; ///< Attempt to buffer a packet for transmit
PFN_API_TX_COMPLETE pfnTxComplete; ///< TX completion for normal data
@ -1132,7 +1132,7 @@ EslSocketIoInit (
IN ESL_IO_MGMT ** ppFreeQueue,
IN UINTN DebugFlags,
IN CHAR8 * pEventName,
IN EFI_EVENT_NOTIFY pfnCompletion
IN PFN_API_IO_COMPLETE pfnCompletion
);
/**