Changeset 4521 in vbox for trunk/src/VBox
- Timestamp:
- Sep 5, 2007 7:39:34 AM (17 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/audio.c
r3670 r4521 337 337 } 338 338 339 void AUD_vlog (const char *cap, const char *fmt, va_list ap) 340 { 339 void AUD_vlog (const char *cap, const char *fmt, va_list va) 340 { 341 va_list va2; 342 va_copy (va2, va); /* Have to make a copy here or GCC will break. */ 341 343 if (cap) { 342 Log (("%s: %N", cap, fmt, & ap));344 Log (("%s: %N", cap, fmt, &va2)); 343 345 } 344 346 else { 345 Log (("%N", fmt, &ap)); 346 } 347 Log (("%N", fmt, &va2)); 348 } 349 va_end (va2); 347 350 } 348 351 349 352 void AUD_log (const char *cap, const char *fmt, ...) 350 353 { 351 va_list ap;352 353 va_start ( ap, fmt);354 AUD_vlog (cap, fmt, ap);355 va_end ( ap);354 va_list va; 355 356 va_start (va, fmt); 357 AUD_vlog (cap, fmt, va); 358 va_end (va); 356 359 } 357 360 -
trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp
r4495 r4521 947 947 else 948 948 { 949 va_list va2; 950 va_copy(va2, args); /* Have to make a copy here or GCC will break. */ 949 951 RTStrPrintf(szError, sizeof(szError), 950 "%N!\nVBox status code: %d (%Vrc)", pszFormat, & args, rc, rc);952 "%N!\nVBox status code: %d (%Vrc)", pszFormat, &va2, rc, rc); 951 953 RTPrintf("%s\n", szError); 954 va_end(va2); 952 955 } 953 956 } … … 969 972 const char *pszFormat, va_list args) 970 973 { 971 RTPrintf("%s: %s!\n%N!\n", fFatal ? "Error" : "Warning", pszErrorId, pszFormat, &args); 974 va_list va2; 975 va_copy(va2, args); /* Have to make a copy here or GCC will break. */ 976 RTPrintf("%s: %s!\n%N!\n", fFatal ? "Error" : "Warning", pszErrorId, pszFormat, &va2); 977 va_end(va2); 972 978 } 973 979 -
trunk/src/VBox/Main/ConsoleImpl.cpp
r4426 r4521 5404 5404 5405 5405 /* we ignore RT_SRC_POS_DECL arguments to avoid confusion of end-users */ 5406 va_list va2; 5407 va_copy(va2, args); /* Have to make a copy here or GCC will break. */ 5406 5408 HRESULT hrc = setError (E_FAIL, tr ("%N.\n" 5407 5409 "VBox status code: %d (%Vrc)"), 5408 tr (pszFormat), & args,5410 tr (pszFormat), &va2, 5409 5411 rc, rc); 5410 5412 task->mProgress->notifyComplete (hrc); 5413 va_end(va2); 5411 5414 } 5412 5415 -
trunk/src/VBox/VMM/PDMDevice.cpp
r4388 r4521 2210 2210 { 2211 2211 PDMDEV_ASSERT_DEVINS(pDevIns); 2212 #ifdef LOG_ENABLED 2213 va_list va2; 2214 va_copy(va2, args); 2212 2215 LogFlow(("pdmR3DevHlp_DBGFStopV: caller='%s'/%d: pszFile=%p:{%s} iLine=%d pszFunction=%p:{%s} pszFormat=%p:{%s} (%N)\n", 2213 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, pszFile, pszFile, iLine, pszFunction, pszFunction, pszFormat, pszFormat, pszFormat, &args)); 2216 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, pszFile, pszFile, iLine, pszFunction, pszFunction, pszFormat, pszFormat, pszFormat, &va2)); 2217 va_end(va2); 2218 #endif 2214 2219 2215 2220 PVM pVM = pDevIns->Internal.s.pVMHC; -
trunk/src/VBox/VMM/VMMAll/VMAll.cpp
r4520 r4521 75 75 * Switch to EMT. 76 76 */ 77 va_list va2; 78 va_copy(va2, args); /* Have to make a copy here or GCC will break. */ 77 79 PVMREQ pReq; 78 80 VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3SetErrorV, 7, /* ASSUMES 3 source pos args! */ 79 pVM, rc, RT_SRC_POS_ARGS, pszFormat, & args);81 pVM, rc, RT_SRC_POS_ARGS, pszFormat, &va2); 80 82 VMR3ReqFree(pReq); 83 va_end(va2); 81 84 82 85 #else … … 250 253 * Switch to EMT. 251 254 */ 252 va_list WorkaroundVA;253 va_copy( WorkaroundVA, args); /* Have to make a copy here or GCC will break. */255 va_list va2; 256 va_copy(va2, args); /* Have to make a copy here or GCC will break. */ 254 257 PVMREQ pReq; 255 258 VMR3ReqCall(pVM, &pReq, RT_INDEFINITE_WAIT, (PFNRT)vmR3SetRuntimeErrorV, 5, 256 pVM, fFatal, pszErrorID, pszFormat, & WorkaroundVA);259 pVM, fFatal, pszErrorID, pszFormat, &va2); 257 260 VMR3ReqFree(pReq); 258 va_end( WorkaroundVA);261 va_end(va2); 259 262 260 263 #else
Note:
See TracChangeset
for help on using the changeset viewer.