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
This commit is contained in:
Olivier Martin
2014-10-30 01:05:22 +00:00
committed by darylm503
parent b07ae3d607
commit 0e565888ee
11 changed files with 449 additions and 426 deletions

View File

@@ -8,7 +8,7 @@
It is the responsibility of the caller, or higher level function, to perform
any necessary translation between wide and narrow characters.
Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2012 - 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
@@ -63,7 +63,6 @@ IIO_WriteOne(struct __filedes *filp, cFIFO *OBuf, wchar_t InCh)
UINT32 CurRow; // Current cursor row on the screen
UINT32 PrevColumn; // Previous column. Used to detect wrapping.
UINT32 AdjColumn; // Current cursor column on the screen
UINT32 AdjRow; // Current cursor row on the screen
RetVal = -1;
wcb = wc;
@@ -79,7 +78,6 @@ IIO_WriteOne(struct __filedes *filp, cFIFO *OBuf, wchar_t InCh)
CurRow = This->CurrentXY.Row;
numW = 1; // The majority of characters buffer one character
AdjRow = 0; // Most characters just cause horizontal movement
AdjColumn = 0;
if(OFlag & OPOST) {
/* Perform output processing */
@@ -127,7 +125,6 @@ IIO_WriteOne(struct __filedes *filp, cFIFO *OBuf, wchar_t InCh)
numW = 2;
CurColumn = 0;
}
AdjRow = 1;
break; //}}
case CHAR_BACKSPACE: //{{