VirtualBox

Changeset 63258 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Aug 10, 2016 12:23:00 PM (8 years ago)
Author:
vboxsync
Message:

Main: warnings

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

Legend:

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

    r63161 r63258  
    11441144    int bindToSession(Console *pConsole, GuestSession *pSession, uint32_t uObjectID);
    11451145    int registerWaitEvent(const GuestEventTypes &lstEvents, GuestWaitEvent **ppEvent);
    1146     int sendCommand(uint32_t uFunction, uint32_t uParms, PVBOXHGCMSVCPARM paParms);
     1146    int sendCommand(uint32_t uFunction, uint32_t cParms, PVBOXHGCMSVCPARM paParms);
    11471147
    11481148protected:
  • trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp

    r63154 r63258  
    580580
    581581    int rc = RTCritSectDelete(&mWaitEventCritSect);
     582    NOREF(rc);
    582583
    583584    LogFlowFuncLeaveRC(rc);
     
    983984
    984985int GuestObject::sendCommand(uint32_t uFunction,
    985                              uint32_t uParms, PVBOXHGCMSVCPARM paParms)
     986                             uint32_t cParms, PVBOXHGCMSVCPARM paParms)
    986987{
    987988#ifndef VBOX_GUESTCTRL_TEST_CASE
     
    995996    if (pVMMDev)
    996997    {
    997         LogFlowThisFunc(("uFunction=%RU32, uParms=%RU32\n", uFunction, uParms));
    998         vrc = pVMMDev->hgcmHostCall(HGCMSERVICE_NAME, uFunction, uParms, paParms);
     998        LogFlowThisFunc(("uFunction=%RU32, cParms=%RU32\n", uFunction, cParms));
     999        vrc = pVMMDev->hgcmHostCall(HGCMSERVICE_NAME, uFunction, cParms, paParms);
    9991000        if (RT_FAILURE(vrc))
    10001001        {
     
    10061007
    10071008    /* Not needed within testcases. */
     1009    RT_NOREF(uFunction, cParms, paParms);
    10081010    int vrc = VINF_SUCCESS;
    10091011#endif
  • trunk/src/VBox/Main/src-client/SessionImpl.cpp

    r62485 r63258  
    278278
    279279#else  /* VBOX_COM_INPROC_API_CLIENT */
     280    RT_NOREF(aConsole);
    280281    AssertFailed();
    281282    return VBOX_E_INVALID_OBJECT_STATE;
     
    293294    return mConsole->i_getNominalState(*aNominalState);
    294295#else
     296    RT_NOREF(aNominalState);
    295297    AssertFailed();
    296298    return E_NOTIMPL;
     
    346348        mRemoteMachine = aMachine;
    347349#else
     350    RT_NOREF(aLockType);
    348351    mRemoteMachine = aMachine;
    349352#endif
     
    502505    return mConsole->i_updateMachineState(aMachineState);
    503506#else
     507    RT_NOREF(aMachineState);
    504508    return S_OK;
    505509#endif
     
    576580    return mConsole->i_onNetworkAdapterChange(aNetworkAdapter, aChangeAdapter);
    577581#else
     582    RT_NOREF(aNetworkAdapter, aChangeAdapter);
    578583    return S_OK;
    579584#endif
     
    592597    return mConsole->i_onSerialPortChange(aSerialPort);
    593598#else
     599    RT_NOREF(aSerialPort);
    594600    return S_OK;
    595601#endif
     
    608614    return mConsole->i_onParallelPortChange(aParallelPort);
    609615#else
     616    RT_NOREF(aParallelPort);
    610617    return S_OK;
    611618#endif
     
    641648    return mConsole->i_onMediumChange(aMediumAttachment, aForce);
    642649#else
     650    RT_NOREF(aMediumAttachment, aForce);
    643651    return S_OK;
    644652#endif
     
    657665    return mConsole->i_onCPUChange(aCpu, aAdd);
    658666#else
     667    RT_NOREF(aCpu, aAdd);
    659668    return S_OK;
    660669#endif
     
    673682    return mConsole->i_onCPUExecutionCapChange(aExecutionCap);
    674683#else
     684    RT_NOREF(aExecutionCap);
    675685    return S_OK;
    676686#endif
     
    689699    return mConsole->i_onVRDEServerChange(aRestart);
    690700#else
     701    RT_NOREF(aRestart);
    691702    return S_OK;
    692703#endif
     
    737748    return mConsole->i_onSharedFolderChange(aGlobal);
    738749#else
     750    RT_NOREF(aGlobal);
    739751    return S_OK;
    740752#endif
     
    753765    return mConsole->i_onClipboardModeChange(aClipboardMode);
    754766#else
     767    RT_NOREF(aClipboardMode);
    755768    return S_OK;
    756769#endif
     
    769782    return mConsole->i_onDnDModeChange(aDndMode);
    770783#else
     784    RT_NOREF(aDndMode);
    771785    return S_OK;
    772786#endif
     
    788802    return mConsole->i_onUSBDeviceAttach(aDevice, aError, aMaskedInterfaces, aCaptureFilename);
    789803#else
     804    RT_NOREF(aDevice, aError, aMaskedInterfaces, aCaptureFilename);
    790805    return S_OK;
    791806#endif
     
    805820    return mConsole->i_onUSBDeviceDetach(aId.toUtf16().raw(), aError);
    806821#else
     822    RT_NOREF(aId, aError);
    807823    return S_OK;
    808824#endif
     
    848864    return mConsole->i_onBandwidthGroupChange(aBandwidthGroup);
    849865#else
     866    RT_NOREF(aBandwidthGroup);
    850867    return S_OK;
    851868#endif
     
    864881    return mConsole->i_onStorageDeviceChange(aMediumAttachment, aRemove, aSilent);
    865882#else
     883    RT_NOREF(aMediumAttachment, aRemove, aSilent);
    866884    return S_OK;
    867885#endif
     
    903921     *        method call, VBoxSVC should be clever enough to see that the
    904922     *        session doesn't have a console! */
     923    RT_NOREF(aName, aValue, aFlags, aAccessMode, aRetValue, aRetTimestamp, aRetFlags);
    905924    return E_ACCESSDENIED;
    906925# endif /* VBOX_COM_INPROC_API_CLIENT */
     
    932951
    933952#else /* VBOX_WITH_GUEST_PROPS not defined */
     953    RT_NOREF(aPatterns, aKeys, aValues, aTimestamps, aFlags);
    934954    ReturnComNotImplemented();
    935955#endif /* VBOX_WITH_GUEST_PROPS not defined */
     
    951971                                         aProgress);
    952972#else
     973    RT_NOREF(aMediumAttachment, aSourceIdx, aTargetIdx, aProgress);
    953974    AssertFailed();
    954975    return E_NOTIMPL;
     
    968989    return mConsole->i_reconfigureMediumAttachments(aAttachments);
    969990#else
     991    RT_NOREF(aAttachments);
    970992    AssertFailed();
    971993    return E_NOTIMPL;
     
    9851007    return S_OK;
    9861008#else
     1009    RT_NOREF(aEnable);
    9871010    AssertFailed();
    9881011    return E_NOTIMPL;
     
    10001023    return mConsole->i_pause(aReason);
    10011024#else
     1025    RT_NOREF(aReason);
    10021026    AssertFailed();
    10031027    return E_NOTIMPL;
     
    10161040    return mConsole->i_resume(aReason, dummyLock);
    10171041#else
     1042    RT_NOREF(aReason);
    10181043    AssertFailed();
    10191044    return E_NOTIMPL;
     
    10211046}
    10221047
    1023 HRESULT Session::saveStateWithReason(Reason_T aReason, const ComPtr<IProgress> &aProgress, const Utf8Str &aStateFilePath, BOOL aPauseVM, BOOL *aLeftPaused)
     1048HRESULT Session::saveStateWithReason(Reason_T aReason, const ComPtr<IProgress> &aProgress, const Utf8Str &aStateFilePath,
     1049                                     BOOL aPauseVM, BOOL *aLeftPaused)
    10241050{
    10251051    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     
    10351061    return rc;
    10361062#else
     1063    RT_NOREF(aReason, aProgress, aStateFilePath, aPauseVM, aLeftPaused);
    10371064    AssertFailed();
    10381065    return E_NOTIMPL;
  • trunk/src/VBox/Main/testcase/tstGuestCtrlParseBuffer.cpp

    r63161 r63258  
    5151    uint32_t    uMapElements;
    5252    int         iResult;
    53 } aTestBlock[] =
     53} g_aTestBlock[] =
    5454{
    5555    /*
     
    103103    /** Overall result when done parsing. */
    104104    int         iResult;
    105 } aTestStream[] =
     105} g_aTestStream[] =
    106106{
    107107    /* No blocks. */
     
    125125        uint32_t    uMapElements;
    126126        int         iResult;
    127     } aTest[] =
     127    } s_aTest[] =
    128128    {
    129129        { "test5=test5\0t51=t51",           sizeof("test5=test5\0t51=t51"),                            0,  sizeof("test5=test5\0") - 1,                   1, VERR_MORE_DATA },
     
    131131    };
    132132
    133     for (unsigned iTest = 0; iTest < RT_ELEMENTS(aTest); iTest++)
     133    for (unsigned iTest = 0; iTest < RT_ELEMENTS(s_aTest); iTest++)
    134134    {
    135135        RTTestIPrintf(RTTESTLVL_DEBUG, "Manual test #%d\n", iTest);
    136136
    137137        GuestProcessStream stream;
    138         rc = stream.AddData((BYTE*)aTest[iTest].pbData, aTest[iTest].cbData);
     138        rc = stream.AddData((BYTE*)s_aTest[iTest].pbData, s_aTest[iTest].cbData);
    139139
    140140        for (;;)
     
    189189
    190190    unsigned iTest;
    191     for (iTest = 0; iTest < RT_ELEMENTS(aTestBlock); iTest++)
     191    for (iTest = 0; iTest < RT_ELEMENTS(g_aTestBlock); iTest++)
    192192    {
    193193        RTTestIPrintf(RTTESTLVL_DEBUG, "=> Test #%u\n", iTest);
    194194
    195195        GuestProcessStream stream;
    196         int iResult = stream.AddData((BYTE*)aTestBlock[iTest].pbData, aTestBlock[iTest].cbData);
     196        int iResult = stream.AddData((BYTE*)g_aTestBlock[iTest].pbData, g_aTestBlock[iTest].cbData);
    197197        if (RT_SUCCESS(iResult))
    198198        {
    199199            GuestProcessStreamBlock curBlock;
    200200            iResult = stream.ParseBlock(curBlock);
    201             if (iResult != aTestBlock[iTest].iResult)
     201            if (iResult != g_aTestBlock[iTest].iResult)
    202202            {
    203203                RTTestFailed(hTest, "\tReturned %Rrc, expected %Rrc\n",
    204                              iResult, aTestBlock[iTest].iResult);
    205             }
    206             else if (stream.GetOffset() != aTestBlock[iTest].uOffsetAfter)
     204                             iResult, g_aTestBlock[iTest].iResult);
     205            }
     206            else if (stream.GetOffset() != g_aTestBlock[iTest].uOffsetAfter)
    207207            {
    208208                RTTestFailed(hTest, "\tOffset %zu wrong, expected %u\n",
    209                              stream.GetOffset(), aTestBlock[iTest].uOffsetAfter);
     209                             stream.GetOffset(), g_aTestBlock[iTest].uOffsetAfter);
    210210            }
    211211            else if (iResult == VERR_MORE_DATA)
     
    217217                   || iResult == VERR_MORE_DATA))
    218218            {
    219                 if (curBlock.GetCount() != aTestBlock[iTest].uMapElements)
     219                if (curBlock.GetCount() != g_aTestBlock[iTest].uMapElements)
    220220                {
    221221                    RTTestFailed(hTest, "\tMap has %u elements, expected %u\n",
    222                                  curBlock.GetCount(), aTestBlock[iTest].uMapElements);
     222                                 curBlock.GetCount(), g_aTestBlock[iTest].uMapElements);
    223223                }
    224224            }
     
    226226            /* There is remaining data left in the buffer (which needs to be merged
    227227             * with a following buffer) -- print it. */
    228             size_t uOffset = stream.GetOffset();
    229             size_t uToWrite = aTestBlock[iTest].cbData - uOffset;
    230             if (uToWrite)
    231             {
    232                 const char *pszRemaining = aTestBlock[iTest].pbData;
    233                 RTTestIPrintf(RTTESTLVL_DEBUG, "\tRemaining (%u):\n", uToWrite);
     228            size_t off = stream.GetOffset();
     229            size_t cbToWrite = g_aTestBlock[iTest].cbData - off;
     230            if (cbToWrite)
     231            {
     232                RTTestIPrintf(RTTESTLVL_DEBUG, "\tRemaining (%u):\n", cbToWrite);
    234233
    235234                /* How to properly get the current RTTESTLVL (aka IPRT_TEST_MAX_LEVEL) here?
    236235                 * Hack alert: Using RTEnvGet for now. */
    237236                if (!RTStrICmp(RTEnvGet("IPRT_TEST_MAX_LEVEL"), "debug"))
    238                     RTStrmWriteEx(g_pStdOut, &aTestBlock[iTest].pbData[uOffset], uToWrite - 1, NULL);
     237                    RTStrmWriteEx(g_pStdOut, &g_aTestBlock[iTest].pbData[off], cbToWrite - 1, NULL);
    239238            }
    240239        }
     
    243242    RTTestIPrintf(RTTESTLVL_INFO, "Doing block tests ...\n");
    244243
    245     for (iTest = 0; iTest < RT_ELEMENTS(aTestStream); iTest++)
     244    for (iTest = 0; iTest < RT_ELEMENTS(g_aTestStream); iTest++)
    246245    {
    247246        RTTestIPrintf(RTTESTLVL_DEBUG, "=> Block test #%u\n", iTest);
    248247
    249248        GuestProcessStream stream;
    250         int iResult = stream.AddData((BYTE*)aTestStream[iTest].pbData, aTestStream[iTest].cbData);
     249        int iResult = stream.AddData((BYTE*)g_aTestStream[iTest].pbData, g_aTestStream[iTest].cbData);
    251250        if (RT_SUCCESS(iResult))
    252251        {
     
    268267            } while (RT_SUCCESS(iResult));
    269268
    270             if (iResult != aTestStream[iTest].iResult)
     269            if (iResult != g_aTestStream[iTest].iResult)
    271270            {
    272271                RTTestFailed(hTest, "\tReturned %Rrc, expected %Rrc\n",
    273                              iResult, aTestStream[iTest].iResult);
    274             }
    275             else if (uNumBlocks != aTestStream[iTest].uNumBlocks)
     272                             iResult, g_aTestStream[iTest].iResult);
     273            }
     274            else if (uNumBlocks != g_aTestStream[iTest].uNumBlocks)
    276275            {
    277276                RTTestFailed(hTest, "\tReturned %u blocks, expected %u\n",
    278                              uNumBlocks, aTestStream[iTest].uNumBlocks);
     277                             uNumBlocks, g_aTestStream[iTest].uNumBlocks);
    279278            }
    280279        }
  • trunk/src/VBox/Main/testcase/tstVBoxAPI.cpp

    r62485 r63258  
    354354
    355355
    356 int main(int argc, char **argv)
     356int main()
    357357{
    358358    /*
  • trunk/src/VBox/Main/testcase/tstVBoxAPIPerf.cpp

    r60924 r63258  
    196196
    197197
    198 int main(int argc, char **argv)
     198int main()
    199199{
    200200    /*
  • trunk/src/VBox/Main/testcase/tstVBoxMultipleVM.cpp

    r63177 r63258  
    337337static int tstClean(IVirtualBox *pVBox, IVirtualBoxClient *pClient)
    338338{
     339    NOREF(pClient);
    339340    HRESULT rc = S_OK;
    340341
     
    380381
    381382
    382 static DECLCALLBACK(int) tstThreadRun(RTTHREAD thread, void *pvUser)
    383 {
     383static DECLCALLBACK(int) tstThreadRun(RTTHREAD hThreadSelf, void *pvUser)
     384{
     385    RT_NOREF(hThreadSelf);
    384386    TestThreadArgs* args = (TestThreadArgs*)pvUser;
    385387    Assert(args != NULL);
  • trunk/src/VBox/Main/webservice/vboxweb.cpp

    r63177 r63258  
    399399     * Static function that can be passed to RTThreadCreate and that calls
    400400     * process() on the SoapThread instance passed as the thread parameter.
    401      * @param pThread
    402      * @param pvThread
     401     *
     402     * @param   hThreadSelf
     403     * @param   pvThread
    403404     * @return
    404405     */
    405     static DECLCALLBACK(int) fntWrapper(RTTHREAD pThread, void *pvThread)
    406     {
     406    static DECLCALLBACK(int) fntWrapper(RTTHREAD hThreadSelf, void *pvThread)
     407    {
     408        RT_NOREF(hThreadSelf);
    407409        SoapThread *pst = (SoapThread*)pvThread;
    408410        pst->process();
    409         return 0;
     411        return VINF_SUCCESS;
    410412    }
    411413
     
    974976 * SOAP queue worker threads.
    975977 */
    976 static DECLCALLBACK(int) fntQPumper(RTTHREAD ThreadSelf, void *pvUser)
    977 {
     978static DECLCALLBACK(int) fntQPumper(RTTHREAD hThreadSelf, void *pvUser)
     979{
     980    RT_NOREF(hThreadSelf, pvUser);
     981
    978982    // store a log prefix for this thread
    979983    util::AutoWriteLock thrLock(g_pThreadsLockHandle COMMA_LOCKVAL_SRC_POS);
     
    985989    thrLock.acquire();
    986990    g_mapThreads.erase(RTThreadSelf());
    987     return 0;
     991    return VINF_SUCCESS;
    988992}
    989993
     
    14371441 * that case, the websession is automatically logged off.
    14381442 */
    1439 static DECLCALLBACK(int) fntWatchdog(RTTHREAD ThreadSelf, void *pvUser)
    1440 {
     1443static DECLCALLBACK(int) fntWatchdog(RTTHREAD hThreadSelf, void *pvUser)
     1444{
     1445    RT_NOREF(hThreadSelf, pvUser);
     1446
    14411447    // store a log prefix for this thread
    14421448    util::AutoWriteLock thrLock(g_pThreadsLockHandle COMMA_LOCKVAL_SRC_POS);
     
    22612267    _vbox__IManagedObjectRef_USCOREgetInterfaceNameResponse *resp)
    22622268{
     2269    RT_NOREF(soap);
    22632270    HRESULT rc = S_OK;
    22642271    WEBDEBUG(("-- entering %s\n", __FUNCTION__));
     
    22962303    _vbox__IManagedObjectRef_USCOREreleaseResponse *resp)
    22972304{
     2305    RT_NOREF(resp);
    22982306    HRESULT rc = S_OK;
    22992307    WEBDEBUG(("-- entering %s\n", __FUNCTION__));
     
    23612369        _vbox__IWebsessionManager_USCORElogonResponse *resp)
    23622370{
     2371    RT_NOREF(soap);
    23632372    HRESULT rc = S_OK;
    23642373    WEBDEBUG(("-- entering %s\n", __FUNCTION__));
     
    24502459        _vbox__IWebsessionManager_USCORElogoffResponse *resp)
    24512460{
     2461    RT_NOREF(resp);
    24522462    HRESULT rc = S_OK;
    24532463    WEBDEBUG(("-- entering %s\n", __FUNCTION__));
    24542464
    2455     do
    24562465    {
    24572466        // findWebsessionFromRef and the websession destructor require the lock
    24582467        util::AutoWriteLock lock(g_pWebsessionsLockHandle COMMA_LOCKVAL_SRC_POS);
    24592468
    2460         WebServiceSession* pWebsession;
    2461         if ((pWebsession = WebServiceSession::findWebsessionFromRef(req->refIVirtualBox)))
     2469        WebServiceSession *pWebsession = WebServiceSession::findWebsessionFromRef(req->refIVirtualBox);
     2470        if (pWebsession)
    24622471        {
    24632472            WEBDEBUG(("websession logoff, deleting websession %#llx\n", pWebsession->getID()));
     
    24672476            WEBDEBUG(("websession destroyed, %d websessions left open\n", g_mapWebsessions.size()));
    24682477        }
    2469     } while (0);
     2478    }
    24702479
    24712480    WEBDEBUG(("-- leaving %s, rc: %#lx\n", __FUNCTION__, rc));
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