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:
committed by
darylm503
parent
b07ae3d607
commit
0e565888ee
@@ -1,7 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2000
|
||||
* Intel Corporation.
|
||||
* All rights reserved.
|
||||
/** @file
|
||||
*
|
||||
* Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
@@ -100,9 +99,11 @@ writev(
|
||||
int iovcnt
|
||||
)
|
||||
{
|
||||
const struct iovec *pVecTmp;
|
||||
char *pBuf, *pBufTmp;
|
||||
size_t TotalBytes, i, ret;
|
||||
const struct iovec *pVecTmp;
|
||||
char *pBuf;
|
||||
size_t TotalBytes;
|
||||
size_t i;
|
||||
size_t ret;
|
||||
|
||||
//
|
||||
// See how much memory we'll need
|
||||
@@ -126,7 +127,7 @@ writev(
|
||||
// Copy vectors to the buffer
|
||||
//
|
||||
|
||||
for (pBufTmp = pBuf; iovcnt; iovcnt--) {
|
||||
for (; iovcnt; iovcnt--) {
|
||||
bcopy(iov->iov_base, pBuf, iov->iov_len);
|
||||
pBuf += iov->iov_len;
|
||||
iov++;
|
||||
|
Reference in New Issue
Block a user