mirror of https://github.com/acidanthera/audk.git
StdLib: Correct two instances of mismatch between function declaration and definition causing GCC compile errors.
StdLib\Include\Containers\Fifo.h Change return type of cFIFO_Truncate to size_t. Makes declaration match definition. Update comment to describe what is returned. StdLib\LibC\Uefi\InteractiveIO\IIOutilities.c Change return type of IIO_CursorDelta to int. Makes declaration match definition. Change other types from INT32 to int, for consistency. Update comment for returned values. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: daryl.mcdaniel@intel.com Reviewed-by: erik.c.bjorge@intel.com git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14060 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
f87146d7c6
commit
920ff98645
|
@ -151,8 +151,10 @@ typedef size_t (EFIAPI *cFIFO_Flush) (cFIFO *Self, size_t NumToFlush);
|
||||||
/** Remove the most recent element from the FIFO.
|
/** Remove the most recent element from the FIFO.
|
||||||
|
|
||||||
@param[in] Self Pointer to the FIFO instance.
|
@param[in] Self Pointer to the FIFO instance.
|
||||||
|
|
||||||
|
@return Returns the number of elements remaining in the FIFO.
|
||||||
**/
|
**/
|
||||||
typedef void (EFIAPI *cFIFO_Truncate) (cFIFO *Self);
|
typedef size_t (EFIAPI *cFIFO_Truncate) (cFIFO *Self);
|
||||||
|
|
||||||
/** Cleanly delete a FIFO instance.
|
/** Cleanly delete a FIFO instance.
|
||||||
|
|
||||||
|
|
|
@ -263,8 +263,10 @@ IIO_GetOutputSize (
|
||||||
@param[in] EndXY Pointer to the ending coordinate pair.
|
@param[in] EndXY Pointer to the ending coordinate pair.
|
||||||
|
|
||||||
@return Returns the difference between the starting and ending coordinates.
|
@return Returns the difference between the starting and ending coordinates.
|
||||||
|
The return value is positive if the coordinates contained in EndXY
|
||||||
|
are larger than StartXY, otherwise the return value is negative.
|
||||||
**/
|
**/
|
||||||
UINT32
|
int
|
||||||
EFIAPI
|
EFIAPI
|
||||||
IIO_CursorDelta (
|
IIO_CursorDelta (
|
||||||
cIIO *This,
|
cIIO *This,
|
||||||
|
@ -272,17 +274,15 @@ IIO_CursorDelta (
|
||||||
CURSOR_XY *EndXY
|
CURSOR_XY *EndXY
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
INT32 ColumnDelta;
|
int ColumnDelta;
|
||||||
INT32 RowDelta;
|
int RowDelta;
|
||||||
|
|
||||||
RowDelta = (int)EndXY->Row - (int)StartXY->Row;
|
RowDelta = (int)EndXY->Row - (int)StartXY->Row;
|
||||||
|
|
||||||
assert(RowDelta >= 0); // assert if EndXY is NOT after StartXY
|
assert(RowDelta >= 0); // assert if EndXY is NOT after StartXY
|
||||||
|
|
||||||
ColumnDelta = (INT32)((This->MaxColumn * RowDelta) + EndXY->Column);
|
ColumnDelta = (int)((This->MaxColumn * RowDelta) + EndXY->Column);
|
||||||
ColumnDelta -= (INT32)StartXY->Column;
|
ColumnDelta -= (int)StartXY->Column;
|
||||||
|
|
||||||
assert(ColumnDelta >= 0); // assert if EndXY is NOT after StartXY
|
return ColumnDelta;
|
||||||
|
|
||||||
return (UINT32)ColumnDelta;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue