VirtualBox

Changeset 26526 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Feb 15, 2010 3:36:01 AM (15 years ago)
Author:
vboxsync
Message:

VMM,asm.h,Config.kmk: win.amd64 warnings; fixed the ASMAtomicSubU32 signature.

Location:
trunk/src/VBox/VMM
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/Makefile.kmk

    r26523 r26526  
    181181        PDMAsyncCompletionFileCache.cpp
    182182endif
     183if defined(VBOX_WITH_WARNINGS_AS_ERRORS) && "$(KBUILD_TARGET)" == "win"
     184PDMAsyncCompletionFileCache.cpp_CXXFLAGS = -WX-
     185endif
    183186
    184187ifdef VBOX_WITH_RAW_MODE
  • trunk/src/VBox/VMM/PDMAsyncCompletionFile.cpp

    r26338 r26526  
    326326    else
    327327    {
    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);
    329330
    330331        if (!(uOld - pTask->DataSeg.cbSeg)
     
    347348           || (enmTransfer == PDMACTASKFILETRANSFER_WRITE));
    348349
    349     ASMAtomicWriteS32(&pTaskFile->cbTransferLeft, cbTransfer);
     350    Assert((uint32_t)cbTransfer == cbTransfer && (uint32_t)cbTransfer >= 0);
     351    ASMAtomicWriteS32(&pTaskFile->cbTransferLeft, (int32_t)cbTransfer);
    350352    ASMAtomicWriteBool(&pTaskFile->fCompleted, false);
    351353
  • trunk/src/VBox/VMM/PDMAsyncCompletionFileCache.cpp

    r26334 r26526  
    605605    PPDMACFILETASKSEG pNext = pTaskSeg->pNext;
    606606
    607     uint32_t uOld = ASMAtomicSubU32(&pTaskSeg->pTask->cbTransferLeft, pTaskSeg->cbTransfer);
     607    uint32_t uOld = ASMAtomicSubS32(&pTaskSeg->pTask->cbTransferLeft, pTaskSeg->cbTransfer);
    608608    AssertMsg(uOld >= pTaskSeg->cbTransfer, ("New value would overflow\n"));
    609609    if (!(uOld - pTaskSeg->cbTransfer)
     
    17711771                LogFlow(("Evicted enough bytes (%u requested). Creating new cache entry\n", cbToWrite));
    17721772
    1773                 uint8_t *pbBuf;
    17741773                PPDMACFILECACHEENTRY pEntryNew;
    17751774
  • trunk/src/VBox/VMM/PDMAsyncCompletionFileNormal.cpp

    r26491 r26526  
    374374static int pdmacFileAioMgrNormalReqsEnqueue(PPDMACEPFILEMGR pAioMgr,
    375375                                            PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint,
    376                                             PRTFILEAIOREQ pahReqs, size_t cReqs)
     376                                            PRTFILEAIOREQ pahReqs, unsigned cReqs)
    377377{
    378378    int rc;
  • trunk/src/VBox/VMM/SSM.cpp

    r25235 r26526  
    559559             * @{ */
    560560            /** The size of the file header. */
    561             size_t          cbFileHdr;
     561            uint32_t        cbFileHdr;
    562562            /** The major version number. */
    563563            uint16_t        u16VerMajor;
     
    23462346    Assert(pStrm->pCur);
    23472347    Assert(pStrm->off + cb <= RT_SIZEOFMEMB(SSMSTRMBUF, abData));
    2348     pStrm->off += cb;
     2348    pStrm->off += (uint32_t)cb;
    23492349    return VINF_SUCCESS;
    23502350}
     
    34083408    while (cbToFill > 0)
    34093409    {
    3410         size_t cb = RT_MIN(sizeof(g_abZero), cbToFill);
     3410        uint32_t cb = RT_MIN(sizeof(g_abZero), cbToFill);
    34113411        int rc = ssmR3DataWrite(pSSM, g_abZero, cb);
    34123412        if (RT_FAILURE(rc))
     
    57985798                    /* Spill the remainer into the data buffer. */
    57995799                    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;
    58015801                    pSSM->u.Read.offDataBuffer = 0;
    58025802                    cbToRead = (uint32_t)cbBuf;
     
    69026902                while (pSSM->u.Read.cbRecLeft)
    69036903                {
    6904                     uint8_t abBuf[8192];
    6905                     size_t cbToRead = 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));
    69066906                    int rc = ssmR3DataReadV2Raw(pSSM, abBuf, cbToRead);
    69076907                    if (RT_FAILURE(rc))
     
    71427142    {
    71437143        char        szMagic[sizeof(SSMFILEHDR_MAGIC_V2_0)];
    7144         size_t      cbHdr;
     7144        uint32_t    cbHdr;
    71457145        unsigned    uFmtVerMajor;
    71467146        unsigned    uFmtVerMinor;
     
    84658465    int rc = ssmR3StrmPeekAt(&pSSM->Strm, offDir, pDir, cbDir, NULL);
    84668466    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);
    84688468    if (RT_FAILURE(rc))
    84698469        return 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