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/LibC/Uefi/InteractiveIO/IIOutilities.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/LibC/Uefi/InteractiveIO/IIOutilities.c')
-rw-r--r-- | StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c b/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c index 0e80ff0eaf..2e61cd1e80 100644 --- a/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c +++ b/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c @@ -75,7 +75,7 @@ IIO_GetInChar ( {
cIIO *This;
cFIFO *InBuf;
- EFI_STATUS Status;
+ size_t Status;
ssize_t NumRead;
wint_t RetVal;
wchar_t InChar;
@@ -92,8 +92,10 @@ IIO_GetInChar ( }
if(BufCnt > 0) {
Status = InBuf->Read(InBuf, &InChar, 1);
- --BufCnt;
- NumRead = 1;
+ if (Status > 0) {
+ --BufCnt;
+ NumRead = 1;
+ }
}
else {
NumRead = filp->f_ops->fo_read(filp, &filp->f_offset, sizeof(wchar_t), &InChar);
|