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

@@ -37,7 +37,6 @@ IIO_NonCanonRead (
cIIO *This;
cFIFO *InBuf;
struct termios *Termio;
EFI_STATUS Status;
ssize_t NumRead;
cc_t tioMin;
cc_t tioTime;
@@ -74,7 +73,7 @@ IIO_NonCanonRead (
if(InBuf->IsEmpty(InBuf)) {
NumRead = filp->f_ops->fo_read(filp, &filp->f_offset, sizeof(wchar_t), &InChar);
if(NumRead > 0) {
Status = InBuf->Write(InBuf, &InChar, 1); // Buffer the character
(void) InBuf->Write(InBuf, &InChar, 1); // Buffer the character
}
}
// break;