Changeset 63258 in vbox for trunk/src/VBox/Main
- Timestamp:
- Aug 10, 2016 12:23:00 PM (8 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h
r63161 r63258 1144 1144 int bindToSession(Console *pConsole, GuestSession *pSession, uint32_t uObjectID); 1145 1145 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); 1147 1147 1148 1148 protected: -
trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
r63154 r63258 580 580 581 581 int rc = RTCritSectDelete(&mWaitEventCritSect); 582 NOREF(rc); 582 583 583 584 LogFlowFuncLeaveRC(rc); … … 983 984 984 985 int GuestObject::sendCommand(uint32_t uFunction, 985 uint32_t uParms, PVBOXHGCMSVCPARM paParms)986 uint32_t cParms, PVBOXHGCMSVCPARM paParms) 986 987 { 987 988 #ifndef VBOX_GUESTCTRL_TEST_CASE … … 995 996 if (pVMMDev) 996 997 { 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); 999 1000 if (RT_FAILURE(vrc)) 1000 1001 { … … 1006 1007 1007 1008 /* Not needed within testcases. */ 1009 RT_NOREF(uFunction, cParms, paParms); 1008 1010 int vrc = VINF_SUCCESS; 1009 1011 #endif -
trunk/src/VBox/Main/src-client/SessionImpl.cpp
r62485 r63258 278 278 279 279 #else /* VBOX_COM_INPROC_API_CLIENT */ 280 RT_NOREF(aConsole); 280 281 AssertFailed(); 281 282 return VBOX_E_INVALID_OBJECT_STATE; … … 293 294 return mConsole->i_getNominalState(*aNominalState); 294 295 #else 296 RT_NOREF(aNominalState); 295 297 AssertFailed(); 296 298 return E_NOTIMPL; … … 346 348 mRemoteMachine = aMachine; 347 349 #else 350 RT_NOREF(aLockType); 348 351 mRemoteMachine = aMachine; 349 352 #endif … … 502 505 return mConsole->i_updateMachineState(aMachineState); 503 506 #else 507 RT_NOREF(aMachineState); 504 508 return S_OK; 505 509 #endif … … 576 580 return mConsole->i_onNetworkAdapterChange(aNetworkAdapter, aChangeAdapter); 577 581 #else 582 RT_NOREF(aNetworkAdapter, aChangeAdapter); 578 583 return S_OK; 579 584 #endif … … 592 597 return mConsole->i_onSerialPortChange(aSerialPort); 593 598 #else 599 RT_NOREF(aSerialPort); 594 600 return S_OK; 595 601 #endif … … 608 614 return mConsole->i_onParallelPortChange(aParallelPort); 609 615 #else 616 RT_NOREF(aParallelPort); 610 617 return S_OK; 611 618 #endif … … 641 648 return mConsole->i_onMediumChange(aMediumAttachment, aForce); 642 649 #else 650 RT_NOREF(aMediumAttachment, aForce); 643 651 return S_OK; 644 652 #endif … … 657 665 return mConsole->i_onCPUChange(aCpu, aAdd); 658 666 #else 667 RT_NOREF(aCpu, aAdd); 659 668 return S_OK; 660 669 #endif … … 673 682 return mConsole->i_onCPUExecutionCapChange(aExecutionCap); 674 683 #else 684 RT_NOREF(aExecutionCap); 675 685 return S_OK; 676 686 #endif … … 689 699 return mConsole->i_onVRDEServerChange(aRestart); 690 700 #else 701 RT_NOREF(aRestart); 691 702 return S_OK; 692 703 #endif … … 737 748 return mConsole->i_onSharedFolderChange(aGlobal); 738 749 #else 750 RT_NOREF(aGlobal); 739 751 return S_OK; 740 752 #endif … … 753 765 return mConsole->i_onClipboardModeChange(aClipboardMode); 754 766 #else 767 RT_NOREF(aClipboardMode); 755 768 return S_OK; 756 769 #endif … … 769 782 return mConsole->i_onDnDModeChange(aDndMode); 770 783 #else 784 RT_NOREF(aDndMode); 771 785 return S_OK; 772 786 #endif … … 788 802 return mConsole->i_onUSBDeviceAttach(aDevice, aError, aMaskedInterfaces, aCaptureFilename); 789 803 #else 804 RT_NOREF(aDevice, aError, aMaskedInterfaces, aCaptureFilename); 790 805 return S_OK; 791 806 #endif … … 805 820 return mConsole->i_onUSBDeviceDetach(aId.toUtf16().raw(), aError); 806 821 #else 822 RT_NOREF(aId, aError); 807 823 return S_OK; 808 824 #endif … … 848 864 return mConsole->i_onBandwidthGroupChange(aBandwidthGroup); 849 865 #else 866 RT_NOREF(aBandwidthGroup); 850 867 return S_OK; 851 868 #endif … … 864 881 return mConsole->i_onStorageDeviceChange(aMediumAttachment, aRemove, aSilent); 865 882 #else 883 RT_NOREF(aMediumAttachment, aRemove, aSilent); 866 884 return S_OK; 867 885 #endif … … 903 921 * method call, VBoxSVC should be clever enough to see that the 904 922 * session doesn't have a console! */ 923 RT_NOREF(aName, aValue, aFlags, aAccessMode, aRetValue, aRetTimestamp, aRetFlags); 905 924 return E_ACCESSDENIED; 906 925 # endif /* VBOX_COM_INPROC_API_CLIENT */ … … 932 951 933 952 #else /* VBOX_WITH_GUEST_PROPS not defined */ 953 RT_NOREF(aPatterns, aKeys, aValues, aTimestamps, aFlags); 934 954 ReturnComNotImplemented(); 935 955 #endif /* VBOX_WITH_GUEST_PROPS not defined */ … … 951 971 aProgress); 952 972 #else 973 RT_NOREF(aMediumAttachment, aSourceIdx, aTargetIdx, aProgress); 953 974 AssertFailed(); 954 975 return E_NOTIMPL; … … 968 989 return mConsole->i_reconfigureMediumAttachments(aAttachments); 969 990 #else 991 RT_NOREF(aAttachments); 970 992 AssertFailed(); 971 993 return E_NOTIMPL; … … 985 1007 return S_OK; 986 1008 #else 1009 RT_NOREF(aEnable); 987 1010 AssertFailed(); 988 1011 return E_NOTIMPL; … … 1000 1023 return mConsole->i_pause(aReason); 1001 1024 #else 1025 RT_NOREF(aReason); 1002 1026 AssertFailed(); 1003 1027 return E_NOTIMPL; … … 1016 1040 return mConsole->i_resume(aReason, dummyLock); 1017 1041 #else 1042 RT_NOREF(aReason); 1018 1043 AssertFailed(); 1019 1044 return E_NOTIMPL; … … 1021 1046 } 1022 1047 1023 HRESULT Session::saveStateWithReason(Reason_T aReason, const ComPtr<IProgress> &aProgress, const Utf8Str &aStateFilePath, BOOL aPauseVM, BOOL *aLeftPaused) 1048 HRESULT Session::saveStateWithReason(Reason_T aReason, const ComPtr<IProgress> &aProgress, const Utf8Str &aStateFilePath, 1049 BOOL aPauseVM, BOOL *aLeftPaused) 1024 1050 { 1025 1051 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); … … 1035 1061 return rc; 1036 1062 #else 1063 RT_NOREF(aReason, aProgress, aStateFilePath, aPauseVM, aLeftPaused); 1037 1064 AssertFailed(); 1038 1065 return E_NOTIMPL; -
trunk/src/VBox/Main/testcase/tstGuestCtrlParseBuffer.cpp
r63161 r63258 51 51 uint32_t uMapElements; 52 52 int iResult; 53 } aTestBlock[] =53 } g_aTestBlock[] = 54 54 { 55 55 /* … … 103 103 /** Overall result when done parsing. */ 104 104 int iResult; 105 } aTestStream[] =105 } g_aTestStream[] = 106 106 { 107 107 /* No blocks. */ … … 125 125 uint32_t uMapElements; 126 126 int iResult; 127 } aTest[] =127 } s_aTest[] = 128 128 { 129 129 { "test5=test5\0t51=t51", sizeof("test5=test5\0t51=t51"), 0, sizeof("test5=test5\0") - 1, 1, VERR_MORE_DATA }, … … 131 131 }; 132 132 133 for (unsigned iTest = 0; iTest < RT_ELEMENTS( aTest); iTest++)133 for (unsigned iTest = 0; iTest < RT_ELEMENTS(s_aTest); iTest++) 134 134 { 135 135 RTTestIPrintf(RTTESTLVL_DEBUG, "Manual test #%d\n", iTest); 136 136 137 137 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); 139 139 140 140 for (;;) … … 189 189 190 190 unsigned iTest; 191 for (iTest = 0; iTest < RT_ELEMENTS( aTestBlock); iTest++)191 for (iTest = 0; iTest < RT_ELEMENTS(g_aTestBlock); iTest++) 192 192 { 193 193 RTTestIPrintf(RTTESTLVL_DEBUG, "=> Test #%u\n", iTest); 194 194 195 195 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); 197 197 if (RT_SUCCESS(iResult)) 198 198 { 199 199 GuestProcessStreamBlock curBlock; 200 200 iResult = stream.ParseBlock(curBlock); 201 if (iResult != aTestBlock[iTest].iResult)201 if (iResult != g_aTestBlock[iTest].iResult) 202 202 { 203 203 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) 207 207 { 208 208 RTTestFailed(hTest, "\tOffset %zu wrong, expected %u\n", 209 stream.GetOffset(), aTestBlock[iTest].uOffsetAfter);209 stream.GetOffset(), g_aTestBlock[iTest].uOffsetAfter); 210 210 } 211 211 else if (iResult == VERR_MORE_DATA) … … 217 217 || iResult == VERR_MORE_DATA)) 218 218 { 219 if (curBlock.GetCount() != aTestBlock[iTest].uMapElements)219 if (curBlock.GetCount() != g_aTestBlock[iTest].uMapElements) 220 220 { 221 221 RTTestFailed(hTest, "\tMap has %u elements, expected %u\n", 222 curBlock.GetCount(), aTestBlock[iTest].uMapElements);222 curBlock.GetCount(), g_aTestBlock[iTest].uMapElements); 223 223 } 224 224 } … … 226 226 /* There is remaining data left in the buffer (which needs to be merged 227 227 * 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); 234 233 235 234 /* How to properly get the current RTTESTLVL (aka IPRT_TEST_MAX_LEVEL) here? 236 235 * Hack alert: Using RTEnvGet for now. */ 237 236 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); 239 238 } 240 239 } … … 243 242 RTTestIPrintf(RTTESTLVL_INFO, "Doing block tests ...\n"); 244 243 245 for (iTest = 0; iTest < RT_ELEMENTS( aTestStream); iTest++)244 for (iTest = 0; iTest < RT_ELEMENTS(g_aTestStream); iTest++) 246 245 { 247 246 RTTestIPrintf(RTTESTLVL_DEBUG, "=> Block test #%u\n", iTest); 248 247 249 248 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); 251 250 if (RT_SUCCESS(iResult)) 252 251 { … … 268 267 } while (RT_SUCCESS(iResult)); 269 268 270 if (iResult != aTestStream[iTest].iResult)269 if (iResult != g_aTestStream[iTest].iResult) 271 270 { 272 271 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) 276 275 { 277 276 RTTestFailed(hTest, "\tReturned %u blocks, expected %u\n", 278 uNumBlocks, aTestStream[iTest].uNumBlocks);277 uNumBlocks, g_aTestStream[iTest].uNumBlocks); 279 278 } 280 279 } -
trunk/src/VBox/Main/testcase/tstVBoxAPI.cpp
r62485 r63258 354 354 355 355 356 int main( int argc, char **argv)356 int main() 357 357 { 358 358 /* -
trunk/src/VBox/Main/testcase/tstVBoxAPIPerf.cpp
r60924 r63258 196 196 197 197 198 int main( int argc, char **argv)198 int main() 199 199 { 200 200 /* -
trunk/src/VBox/Main/testcase/tstVBoxMultipleVM.cpp
r63177 r63258 337 337 static int tstClean(IVirtualBox *pVBox, IVirtualBoxClient *pClient) 338 338 { 339 NOREF(pClient); 339 340 HRESULT rc = S_OK; 340 341 … … 380 381 381 382 382 static DECLCALLBACK(int) tstThreadRun(RTTHREAD thread, void *pvUser) 383 { 383 static DECLCALLBACK(int) tstThreadRun(RTTHREAD hThreadSelf, void *pvUser) 384 { 385 RT_NOREF(hThreadSelf); 384 386 TestThreadArgs* args = (TestThreadArgs*)pvUser; 385 387 Assert(args != NULL); -
trunk/src/VBox/Main/webservice/vboxweb.cpp
r63177 r63258 399 399 * Static function that can be passed to RTThreadCreate and that calls 400 400 * process() on the SoapThread instance passed as the thread parameter. 401 * @param pThread 402 * @param pvThread 401 * 402 * @param hThreadSelf 403 * @param pvThread 403 404 * @return 404 405 */ 405 static DECLCALLBACK(int) fntWrapper(RTTHREAD pThread, void *pvThread) 406 { 406 static DECLCALLBACK(int) fntWrapper(RTTHREAD hThreadSelf, void *pvThread) 407 { 408 RT_NOREF(hThreadSelf); 407 409 SoapThread *pst = (SoapThread*)pvThread; 408 410 pst->process(); 409 return 0;411 return VINF_SUCCESS; 410 412 } 411 413 … … 974 976 * SOAP queue worker threads. 975 977 */ 976 static DECLCALLBACK(int) fntQPumper(RTTHREAD ThreadSelf, void *pvUser) 977 { 978 static DECLCALLBACK(int) fntQPumper(RTTHREAD hThreadSelf, void *pvUser) 979 { 980 RT_NOREF(hThreadSelf, pvUser); 981 978 982 // store a log prefix for this thread 979 983 util::AutoWriteLock thrLock(g_pThreadsLockHandle COMMA_LOCKVAL_SRC_POS); … … 985 989 thrLock.acquire(); 986 990 g_mapThreads.erase(RTThreadSelf()); 987 return 0;991 return VINF_SUCCESS; 988 992 } 989 993 … … 1437 1441 * that case, the websession is automatically logged off. 1438 1442 */ 1439 static DECLCALLBACK(int) fntWatchdog(RTTHREAD ThreadSelf, void *pvUser) 1440 { 1443 static DECLCALLBACK(int) fntWatchdog(RTTHREAD hThreadSelf, void *pvUser) 1444 { 1445 RT_NOREF(hThreadSelf, pvUser); 1446 1441 1447 // store a log prefix for this thread 1442 1448 util::AutoWriteLock thrLock(g_pThreadsLockHandle COMMA_LOCKVAL_SRC_POS); … … 2261 2267 _vbox__IManagedObjectRef_USCOREgetInterfaceNameResponse *resp) 2262 2268 { 2269 RT_NOREF(soap); 2263 2270 HRESULT rc = S_OK; 2264 2271 WEBDEBUG(("-- entering %s\n", __FUNCTION__)); … … 2296 2303 _vbox__IManagedObjectRef_USCOREreleaseResponse *resp) 2297 2304 { 2305 RT_NOREF(resp); 2298 2306 HRESULT rc = S_OK; 2299 2307 WEBDEBUG(("-- entering %s\n", __FUNCTION__)); … … 2361 2369 _vbox__IWebsessionManager_USCORElogonResponse *resp) 2362 2370 { 2371 RT_NOREF(soap); 2363 2372 HRESULT rc = S_OK; 2364 2373 WEBDEBUG(("-- entering %s\n", __FUNCTION__)); … … 2450 2459 _vbox__IWebsessionManager_USCORElogoffResponse *resp) 2451 2460 { 2461 RT_NOREF(resp); 2452 2462 HRESULT rc = S_OK; 2453 2463 WEBDEBUG(("-- entering %s\n", __FUNCTION__)); 2454 2464 2455 do2456 2465 { 2457 2466 // findWebsessionFromRef and the websession destructor require the lock 2458 2467 util::AutoWriteLock lock(g_pWebsessionsLockHandle COMMA_LOCKVAL_SRC_POS); 2459 2468 2460 WebServiceSession * pWebsession;2461 if ( (pWebsession = WebServiceSession::findWebsessionFromRef(req->refIVirtualBox)))2469 WebServiceSession *pWebsession = WebServiceSession::findWebsessionFromRef(req->refIVirtualBox); 2470 if (pWebsession) 2462 2471 { 2463 2472 WEBDEBUG(("websession logoff, deleting websession %#llx\n", pWebsession->getID())); … … 2467 2476 WEBDEBUG(("websession destroyed, %d websessions left open\n", g_mapWebsessions.size())); 2468 2477 } 2469 } while (0);2478 } 2470 2479 2471 2480 WEBDEBUG(("-- leaving %s, rc: %#lx\n", __FUNCTION__, rc));
Note:
See TracChangeset
for help on using the changeset viewer.