VirtualBox

Changeset 63161 in vbox


Ignore:
Timestamp:
Aug 8, 2016 12:51:16 PM (8 years ago)
Author:
vboxsync
Message:

Main: Warnings

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h

    r63154 r63161  
    823823#endif
    824824
    825     uint32_t GetOffset() { return m_offBuffer; }
     825    size_t GetOffset() { return m_offBuffer; }
    826826
    827827    size_t GetSize() { return m_cbUsed; }
  • trunk/src/VBox/Main/testcase/tstGuestCtrlParseBuffer.cpp

    r62485 r63161  
    114114};
    115115
    116 int manualTest()
    117 {
    118     int rc;
     116int manualTest(void)
     117{
     118    int rc = VINF_SUCCESS;
    119119    static struct
    120120    {
     
    131131    };
    132132
    133     unsigned iTest = 0;
    134     for (iTest; iTest < RT_ELEMENTS(aTest); iTest++)
     133    for (unsigned iTest = 0; iTest < RT_ELEMENTS(aTest); iTest++)
    135134    {
    136135        RTTestIPrintf(RTTESTLVL_DEBUG, "Manual test #%d\n", iTest);
     
    189188    RTAssertSetQuiet(true);
    190189
    191     unsigned iTest = 0;
    192     for (iTest; iTest < RT_ELEMENTS(aTestBlock); iTest++)
     190    unsigned iTest;
     191    for (iTest = 0; iTest < RT_ELEMENTS(aTestBlock); iTest++)
    193192    {
    194193        RTTestIPrintf(RTTESTLVL_DEBUG, "=> Test #%u\n", iTest);
     
    207206            else if (stream.GetOffset() != aTestBlock[iTest].uOffsetAfter)
    208207            {
    209                 RTTestFailed(hTest, "\tOffset %u wrong, expected %u\n",
     208                RTTestFailed(hTest, "\tOffset %zu wrong, expected %u\n",
    210209                             stream.GetOffset(), aTestBlock[iTest].uOffsetAfter);
    211210            }
    212211            else if (iResult == VERR_MORE_DATA)
    213212            {
    214                 RTTestIPrintf(RTTESTLVL_DEBUG, "\tMore data (Offset: %u)\n", stream.GetOffset());
     213                RTTestIPrintf(RTTESTLVL_DEBUG, "\tMore data (Offset: %zu)\n", stream.GetOffset());
    215214            }
    216215
     
    227226            /* There is remaining data left in the buffer (which needs to be merged
    228227             * with a following buffer) -- print it. */
    229             uint32_t uOffset = stream.GetOffset();
     228            size_t uOffset = stream.GetOffset();
    230229            size_t uToWrite = aTestBlock[iTest].cbData - uOffset;
    231230            if (uToWrite)
     
    244243    RTTestIPrintf(RTTESTLVL_INFO, "Doing block tests ...\n");
    245244
    246     iTest = 0;
    247     for (iTest; iTest < RT_ELEMENTS(aTestStream); iTest++)
     245    for (iTest = 0; iTest < RT_ELEMENTS(aTestStream); iTest++)
    248246    {
    249247        RTTestIPrintf(RTTESTLVL_DEBUG, "=> Block test #%u\n", iTest);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette