Changeset 26526 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Feb 15, 2010 3:36:01 AM (15 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/Makefile.kmk
r26523 r26526 181 181 PDMAsyncCompletionFileCache.cpp 182 182 endif 183 if defined(VBOX_WITH_WARNINGS_AS_ERRORS) && "$(KBUILD_TARGET)" == "win" 184 PDMAsyncCompletionFileCache.cpp_CXXFLAGS = -WX- 185 endif 183 186 184 187 ifdef VBOX_WITH_RAW_MODE -
trunk/src/VBox/VMM/PDMAsyncCompletionFile.cpp
r26338 r26526 326 326 else 327 327 { 328 uint32_t uOld = ASMAtomicSubU32(&pTaskFile->cbTransferLeft, pTask->DataSeg.cbSeg); 328 Assert((uint32_t)pTask->DataSeg.cbSeg == pTask->DataSeg.cbSeg && (int32_t)pTask->DataSeg.cbSeg >= 0); 329 uint32_t uOld = ASMAtomicSubS32(&pTaskFile->cbTransferLeft, (int32_t)pTask->DataSeg.cbSeg); 329 330 330 331 if (!(uOld - pTask->DataSeg.cbSeg) … … 347 348 || (enmTransfer == PDMACTASKFILETRANSFER_WRITE)); 348 349 349 ASMAtomicWriteS32(&pTaskFile->cbTransferLeft, cbTransfer); 350 Assert((uint32_t)cbTransfer == cbTransfer && (uint32_t)cbTransfer >= 0); 351 ASMAtomicWriteS32(&pTaskFile->cbTransferLeft, (int32_t)cbTransfer); 350 352 ASMAtomicWriteBool(&pTaskFile->fCompleted, false); 351 353 -
trunk/src/VBox/VMM/PDMAsyncCompletionFileCache.cpp
r26334 r26526 605 605 PPDMACFILETASKSEG pNext = pTaskSeg->pNext; 606 606 607 uint32_t uOld = ASMAtomicSub U32(&pTaskSeg->pTask->cbTransferLeft, pTaskSeg->cbTransfer);607 uint32_t uOld = ASMAtomicSubS32(&pTaskSeg->pTask->cbTransferLeft, pTaskSeg->cbTransfer); 608 608 AssertMsg(uOld >= pTaskSeg->cbTransfer, ("New value would overflow\n")); 609 609 if (!(uOld - pTaskSeg->cbTransfer) … … 1771 1771 LogFlow(("Evicted enough bytes (%u requested). Creating new cache entry\n", cbToWrite)); 1772 1772 1773 uint8_t *pbBuf;1774 1773 PPDMACFILECACHEENTRY pEntryNew; 1775 1774 -
trunk/src/VBox/VMM/PDMAsyncCompletionFileNormal.cpp
r26491 r26526 374 374 static int pdmacFileAioMgrNormalReqsEnqueue(PPDMACEPFILEMGR pAioMgr, 375 375 PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint, 376 PRTFILEAIOREQ pahReqs, size_tcReqs)376 PRTFILEAIOREQ pahReqs, unsigned cReqs) 377 377 { 378 378 int rc; -
trunk/src/VBox/VMM/SSM.cpp
r25235 r26526 559 559 * @{ */ 560 560 /** The size of the file header. */ 561 size_tcbFileHdr;561 uint32_t cbFileHdr; 562 562 /** The major version number. */ 563 563 uint16_t u16VerMajor; … … 2346 2346 Assert(pStrm->pCur); 2347 2347 Assert(pStrm->off + cb <= RT_SIZEOFMEMB(SSMSTRMBUF, abData)); 2348 pStrm->off += cb;2348 pStrm->off += (uint32_t)cb; 2349 2349 return VINF_SUCCESS; 2350 2350 } … … 3408 3408 while (cbToFill > 0) 3409 3409 { 3410 size_t cb = RT_MIN(sizeof(g_abZero), cbToFill);3410 uint32_t cb = RT_MIN(sizeof(g_abZero), cbToFill); 3411 3411 int rc = ssmR3DataWrite(pSSM, g_abZero, cb); 3412 3412 if (RT_FAILURE(rc)) … … 5798 5798 /* Spill the remainer into the data buffer. */ 5799 5799 memset(&pSSM->u.Read.abDataBuffer[0], 0, cbToRead - cbBuf); 5800 pSSM->u.Read.cbDataBuffer = cbToRead - cbBuf;5800 pSSM->u.Read.cbDataBuffer = cbToRead - (uint32_t)cbBuf; 5801 5801 pSSM->u.Read.offDataBuffer = 0; 5802 5802 cbToRead = (uint32_t)cbBuf; … … 6902 6902 while (pSSM->u.Read.cbRecLeft) 6903 6903 { 6904 uint8_t abBuf[8192];6905 size_tcbToRead = RT_MIN(pSSM->u.Read.cbRecLeft, sizeof(abBuf));6904 uint8_t abBuf[8192]; 6905 uint32_t cbToRead = RT_MIN(pSSM->u.Read.cbRecLeft, sizeof(abBuf)); 6906 6906 int rc = ssmR3DataReadV2Raw(pSSM, abBuf, cbToRead); 6907 6907 if (RT_FAILURE(rc)) … … 7142 7142 { 7143 7143 char szMagic[sizeof(SSMFILEHDR_MAGIC_V2_0)]; 7144 size_tcbHdr;7144 uint32_t cbHdr; 7145 7145 unsigned uFmtVerMajor; 7146 7146 unsigned uFmtVerMinor; … … 8465 8465 int rc = ssmR3StrmPeekAt(&pSSM->Strm, offDir, pDir, cbDir, NULL); 8466 8466 AssertLogRelRCReturn(rc, rc); 8467 rc = ssmR3ValidateDirectory(pDir, cbDir, offDir, cDirEntries, pSSM->u.Read.cbFileHdr, pSSM->u.Read.u32SvnRev);8467 rc = ssmR3ValidateDirectory(pDir, (uint32_t)cbDir, offDir, cDirEntries, pSSM->u.Read.cbFileHdr, pSSM->u.Read.u32SvnRev); 8468 8468 if (RT_FAILURE(rc)) 8469 8469 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.