VirtualBox

Changeset 23212 in vbox


Ignore:
Timestamp:
Sep 22, 2009 12:08:33 PM (15 years ago)
Author:
vboxsync
Message:

PDMAsyncCompletionFileNormal.cpp: Fixed harmful casts introduced in r52654.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PDMAsyncCompletionFileNormal.cpp

    r23207 r23212  
    375375                PDMACTASKFILETRANSFER enmTransferType = pCurr->enmTransferType;
    376376
    377                 AssertMsg((  (pCurr->enmTransferType == PDMACTASKFILETRANSFER_WRITE)
    378                            || ((size_t)(OffStart + cbToTransfer) <= pEndpoint->cbFile)),
     377                AssertMsg(   pCurr->enmTransferType == PDMACTASKFILETRANSFER_WRITE
     378                          || (uint64_t)(OffStart + cbToTransfer) <= pEndpoint->cbFile,
    379379                          ("Read exceeds file size OffStart=%RTfoff cbToTransfer=%d cbFile=%llu\n",
    380380                          OffStart, cbToTransfer, pEndpoint->cbFile));
     
    424424                {
    425425                    /* Grow the file if needed. */
    426                     if (RT_UNLIKELY((size_t)(pCurr->Off + pCurr->DataSeg.cbSeg) > pEndpoint->cbFile))
     426                    if (RT_UNLIKELY((uint64_t)(pCurr->Off + pCurr->DataSeg.cbSeg) > pEndpoint->cbFile))
    427427                    {
    428428                        ASMAtomicWriteU64(&pEndpoint->cbFile, pCurr->Off + pCurr->DataSeg.cbSeg);
     
    738738
    739739                        /* Grow the file if needed. */
    740                         if (RT_UNLIKELY((size_t)(pTask->Off + pTask->DataSeg.cbSeg) > pEndpoint->cbFile))
     740                        if (RT_UNLIKELY((uint64_t)(pTask->Off + pTask->DataSeg.cbSeg) > pEndpoint->cbFile))
    741741                        {
    742742                            ASMAtomicWriteU64(&pEndpoint->cbFile, pTask->Off + pTask->DataSeg.cbSeg);
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