diff options
author | Olivier Martin <olivier.martin@arm.com> | 2014-10-30 01:05:22 +0000 |
---|---|---|
committer | darylm503 <darylm503@Edk2> | 2014-10-30 01:05:22 +0000 |
commit | 0e565888ee40264bfad5a700e0d62f4824d81c18 (patch) | |
tree | cc2842df141ff68b559f8faaf6182dbb49ed0dc8 /StdLib/EfiSocketLib/Ip4.c | |
parent | b07ae3d6073f9ec69ae4316b0832fc96325c01d4 (diff) | |
download | edk2-platforms-0e565888ee40264bfad5a700e0d62f4824d81c18.tar.xz |
StdLib: Fix GCC warnings/errors caused by variables being set but not used.
Removed variables that had no effect on code behavior.
Fifo.c::FIFO_Dequeue: Replaced instances of "Self->ElementSize" with preexisting variable "SizeOfElement".
IIOutilities.c::IIO_GetInChar: Fixed variable of wrong, but compatible, type and made updating of housekeeping variables dependent upon successful completion of reading from the buffer.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed by: Daryl McDaniel <daryl.mcdaniel@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16276 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'StdLib/EfiSocketLib/Ip4.c')
-rw-r--r-- | StdLib/EfiSocketLib/Ip4.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/StdLib/EfiSocketLib/Ip4.c b/StdLib/EfiSocketLib/Ip4.c index ed71194163..84646e726a 100644 --- a/StdLib/EfiSocketLib/Ip4.c +++ b/StdLib/EfiSocketLib/Ip4.c @@ -1,11 +1,11 @@ /** @file
Implement the IP4 driver support for the socket layer.
- Copyright (c) 2011, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
+ Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials are licensed and made available
+ under the terms and conditions of the BSD License which accompanies this
+ distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@@ -430,13 +430,13 @@ EslIp4PortAllocate ( @param [in] pPort Address of an ::ESL_PORT structure.
@param [in] pPacket Address of an ::ESL_PACKET structure.
-
+
@param [in] pbConsumePacket Address of a BOOLEAN indicating if the packet is to be consumed
-
+
@param [in] BufferLength Length of the the buffer
-
+
@param [in] pBuffer Address of a buffer to receive the data.
-
+
@param [in] pDataLength Number of received data bytes in the buffer.
@param [out] pAddress Network address to receive the remote system address
@@ -653,17 +653,15 @@ EslIp4RxComplete ( )
{
size_t LengthInBytes;
- ESL_PORT * pPort;
ESL_PACKET * pPacket;
EFI_IP4_RECEIVE_DATA * pRxData;
EFI_STATUS Status;
-
+
DBG_ENTER ( );
-
+
//
// Get the operation status.
//
- pPort = pIo->pPort;
Status = pIo->Token.Ip4Rx.Status;
//
@@ -672,7 +670,7 @@ EslIp4RxComplete ( pRxData = pIo->Token.Ip4Rx.Packet.RxData;
LengthInBytes = pRxData->HeaderLength + pRxData->DataLength;
- //
+ //{{
// +--------------------+ +----------------------+
// | ESL_IO_MGMT | | Data Buffer |
// | | | (Driver owned) |
@@ -692,7 +690,7 @@ EslIp4RxComplete ( //
//
// Save the data in the packet
- //
+ //}}
pPacket = pIo->pPacket;
pPacket->Op.Ip4Rx.pRxData = pRxData;
@@ -717,7 +715,7 @@ EslIp4RxComplete ( that the socket is configured.
@param [in] pSocket Address of an ::ESL_SOCKET structure
-
+
@retval EFI_SUCCESS - The port is connected
@retval EFI_NOT_STARTED - The port is not connected
@@ -904,7 +902,7 @@ EslIp4RxComplete ( // Determine the socket configuration status
//
Status = pSocket->bConfigured ? EFI_SUCCESS : EFI_NOT_STARTED;
-
+
//
// Return the port connected state.
//
@@ -1188,9 +1186,9 @@ EslIp4TxComplete ( ESL_PACKET * pPacket;
ESL_SOCKET * pSocket;
EFI_STATUS Status;
-
+
DBG_ENTER ( );
-
+
//
// Locate the active transmit packet
//
|