Revision: 14060
          http://edk2.svn.sourceforge.net/edk2/?rev=14060&view=rev
Author:   darylm503
Date:     2013-01-16 23:45:54 +0000 (Wed, 16 Jan 2013)
Log Message:
-----------
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:  [email protected]
Reviewed-by:    [email protected]

Modified Paths:
--------------
    trunk/edk2/StdLib/Include/Containers/Fifo.h
    trunk/edk2/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c

Modified: trunk/edk2/StdLib/Include/Containers/Fifo.h
===================================================================
--- trunk/edk2/StdLib/Include/Containers/Fifo.h 2013-01-16 23:45:13 UTC (rev 
14059)
+++ trunk/edk2/StdLib/Include/Containers/Fifo.h 2013-01-16 23:45:54 UTC (rev 
14060)
@@ -151,8 +151,10 @@
 /** Remove the most recent element from the FIFO.
 
     @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.
 

Modified: trunk/edk2/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c
===================================================================
--- trunk/edk2/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c    2013-01-16 
23:45:13 UTC (rev 14059)
+++ trunk/edk2/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c    2013-01-16 
23:45:54 UTC (rev 14060)
@@ -263,8 +263,10 @@
     @param[in]      EndXY     Pointer to the ending coordinate pair.
 
     @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
 IIO_CursorDelta (
   cIIO         *This,
@@ -272,17 +274,15 @@
   CURSOR_XY    *EndXY
 )
 {
-  INT32    ColumnDelta;
-  INT32    RowDelta;
+  int    ColumnDelta;
+  int    RowDelta;
 
   RowDelta = (int)EndXY->Row - (int)StartXY->Row;
 
   assert(RowDelta >= 0);    // assert if EndXY is NOT after StartXY
 
-  ColumnDelta = (INT32)((This->MaxColumn * RowDelta) + EndXY->Column);
-  ColumnDelta -= (INT32)StartXY->Column;
+  ColumnDelta = (int)((This->MaxColumn * RowDelta) + EndXY->Column);
+  ColumnDelta -= (int)StartXY->Column;
 
-  assert(ColumnDelta >= 0); // assert if EndXY is NOT after StartXY
-
-  return (UINT32)ColumnDelta;
+  return ColumnDelta;
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to