VirtualBox

Changeset 18505 in vbox for trunk/src/VBox/Devices/Storage


Ignore:
Timestamp:
Mar 29, 2009 2:39:11 AM (16 years ago)
Author:
vboxsync
Message:

VmdkHDDCore.cpp: a bunch of size_t/unsigned mixups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp

    r18347 r18505  
    891891
    892892        Marker.uSector = RT_H2LE_U64(uLBA);
    893         Marker.cbSize = RT_H2LE_U32(cbToWrite);
     893        Marker.cbSize = RT_H2LE_U32((uint32_t)cbToWrite);
    894894        if (uMarker == VMDK_MARKER_IGNORE)
    895895        {
     
    57045704    unsigned cTasksToSubmit = 0;
    57055705    PPDMDATASEG paSegCurrent = paSeg;
    5706     unsigned cbLeftInCurrentSegment = paSegCurrent->cbSeg;
    5707     unsigned uOffsetInCurrentSegment = 0;
     5706    size_t cbLeftInCurrentSegment = paSegCurrent->cbSeg;
     5707    size_t uOffsetInCurrentSegment = 0;
    57085708
    57095709    AssertPtr(pImage);
     
    57205720    while (cbRead && cSeg)
    57215721    {
    5722         unsigned cbToRead;
     5722        size_t cbToRead;
    57235723        uint64_t uSectorExtentRel;
    57245724
     
    57475747                void *pTask;
    57485748                rc = pImage->pInterfaceAsyncIOCallbacks->pfnPrepareRead(pImage->pInterfaceAsyncIO->pvUser, pExtent->pFile->pStorage,
    5749                                                                        VMDK_SECTOR2BYTE(uSectorExtentRel),
    5750                                                                        (uint8_t *)paSegCurrent->pvSeg + uOffsetInCurrentSegment,
    5751                                                                        cbToRead, &pTask);
     5749                                                                        VMDK_SECTOR2BYTE(uSectorExtentRel),
     5750                                                                        (uint8_t *)paSegCurrent->pvSeg + uOffsetInCurrentSegment,
     5751                                                                        cbToRead, &pTask);
    57525752                if (RT_FAILURE(rc))
    57535753                {
     
    58405840    unsigned cTasksToSubmit = 0;
    58415841    PPDMDATASEG paSegCurrent = paSeg;
    5842     unsigned cbLeftInCurrentSegment = paSegCurrent->cbSeg;
    5843     unsigned uOffsetInCurrentSegment = 0;
     5842    size_t cbLeftInCurrentSegment = paSegCurrent->cbSeg;
     5843    size_t uOffsetInCurrentSegment = 0;
    58445844
    58455845    AssertPtr(pImage);
     
    58565856    while (cbWrite && cSeg)
    58575857    {
    5858         unsigned cbToWrite;
     5858        size_t cbToWrite;
    58595859        uint64_t uSectorExtentRel;
    58605860
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