VirtualBox

Changeset 48851 in vbox for trunk


Ignore:
Timestamp:
Oct 3, 2013 8:02:34 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
89520
Message:

Storage: Addressing 64-bit windows warnings.

Location:
trunk/src/VBox/Storage
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/ISCSI.cpp

    r48743 r48851  
    26832683    paReqBHS[3] = RT_H2N_U32(pImage->LUN & 0xffffffff);
    26842684    paReqBHS[4] = pIScsiCmd->Itt;
    2685     paReqBHS[5] = RT_H2N_U32(cbData);
     2685    paReqBHS[5] = RT_H2N_U32((uint32_t)cbData); Assert((uint32_t)cbData == cbData);
    26862686    paReqBHS[6] = RT_H2N_U32(pImage->CmdSN);
    26872687    paReqBHS[7] = RT_H2N_U32(pImage->ExpStatSN);
  • trunk/src/VBox/Storage/QCOW.cpp

    r48743 r48851  
    24382438                    Assert((offData & UINT32_MAX) == offData);
    24392439                    pImage->offBackingFilename = (uint32_t)offData;
    2440                     pImage->cbBackingFilename  = strlen(pszParentFilename);
     2440                    pImage->cbBackingFilename  = (uint32_t)strlen(pszParentFilename);
    24412441                    rc = vdIfIoIntFileSetSize(pImage->pIfIo, pImage->pStorage,
    24422442                                              offData + pImage->cbCluster);
  • trunk/src/VBox/Storage/QED.cpp

    r48743 r48851  
    25262526                    Assert((offData & UINT32_MAX) == offData);
    25272527                    pImage->offBackingFilename = (uint32_t)offData;
    2528                     pImage->cbBackingFilename  = strlen(pszParentFilename);
     2528                    pImage->cbBackingFilename  = (uint32_t)strlen(pszParentFilename);
    25292529                    rc = vdIfIoIntFileSetSize(pImage->pIfIo, pImage->pStorage,
    25302530                                              offData + pImage->cbCluster);
  • trunk/src/VBox/Storage/VDI.cpp

    r48743 r48851  
    12401240static void *vdiAllocationBitmapCreate(void *pvData, size_t cbData)
    12411241{
    1242     unsigned cSectors = cbData / 512;
    1243     unsigned uSectorCur = 0;
     1242    Assert(cbData <= UINT32_MAX / 8);
     1243    uint32_t cSectors = (uint32_t)(cbData / 512);
     1244    uint32_t uSectorCur = 0;
    12441245    void *pbmAllocationBitmap = NULL;
    12451246
     
    12531254    while (uSectorCur < cSectors)
    12541255    {
    1255         int idxSet = ASMBitFirstSet((uint8_t *)pvData + uSectorCur * 512, cbData * 8);
     1256        int idxSet = ASMBitFirstSet((uint8_t *)pvData + uSectorCur * 512, (uint32_t)cbData * 8);
    12561257
    12571258        if (idxSet != -1)
  • trunk/src/VBox/Storage/VHD.cpp

    r48743 r48851  
    30863086
    30873087                    if (   paBat[i] != UINT32_C(0xffffffff)
    3088                         && ASMBitTestAndSet(pu32BlockBitmap, (paBat[i] - idxMinBlock) / (cbBlock / VHD_SECTOR_SIZE)))
     3088                        && ASMBitTestAndSet(pu32BlockBitmap, (uint32_t)((paBat[i] - idxMinBlock) / (cbBlock / VHD_SECTOR_SIZE))))
    30893089                    {
    30903090                        vdIfErrorMessage(pIfError, "Entry %u points to an already referenced data block, clearing\n",
  • trunk/src/VBox/Storage/VHDX.cpp

    r48743 r48851  
    511511{
    512512    /** Image name. */
    513     const char          *pszFilename;
     513    const char         *pszFilename;
    514514    /** Storage handle. */
    515     PVDIOSTORAGE         pStorage;
     515    PVDIOSTORAGE        pStorage;
    516516
    517517    /** Pointer to the per-disk VD interface list. */
    518     PVDINTERFACE         pVDIfsDisk;
     518    PVDINTERFACE        pVDIfsDisk;
    519519    /** Pointer to the per-image VD interface list. */
    520     PVDINTERFACE         pVDIfsImage;
     520    PVDINTERFACE        pVDIfsImage;
    521521    /** Error interface. */
    522     PVDINTERFACEERROR    pIfError;
     522    PVDINTERFACEERROR   pIfError;
    523523    /** I/O interface. */
    524     PVDINTERFACEIOINT    pIfIo;
     524    PVDINTERFACEIOINT   pIfIo;
    525525
    526526    /** Open flags passed by VBoxHD layer. */
    527     unsigned             uOpenFlags;
     527    unsigned            uOpenFlags;
    528528    /** Image flags defined during creation or determined during open. */
    529     unsigned             uImageFlags;
     529    unsigned            uImageFlags;
    530530    /** Version of the VHDX image format. */
    531     unsigned             uVersion;
     531    unsigned            uVersion;
    532532    /** Total size of the image. */
    533     uint64_t             cbSize;
     533    uint64_t            cbSize;
    534534    /** Logical sector size of the image. */
    535     size_t               cbLogicalSector;
     535    uint32_t            cbLogicalSector;
    536536    /** Block size of the image. */
    537     size_t               cbBlock;
     537    size_t              cbBlock;
    538538    /** Physical geometry of this image. */
    539     VDGEOMETRY           PCHSGeometry;
     539    VDGEOMETRY          PCHSGeometry;
    540540    /** Logical geometry of this image. */
    541     VDGEOMETRY           LCHSGeometry;
     541    VDGEOMETRY          LCHSGeometry;
    542542
    543543    /** The BAT. */
    544     PVhdxBatEntry        paBat;
     544    PVhdxBatEntry       paBat;
    545545    /** Chunk ratio. */
    546     uint32_t             uChunkRatio;
     546    uint32_t            uChunkRatio;
    547547
    548548} VHDXIMAGE, *PVHDXIMAGE;
     
    11441144
    11451145    /* Calculate required values first. */
    1146     uChunkRatio = (RT_BIT_64(23) * pImage->cbLogicalSector) / pImage->cbBlock;
    1147     cDataBlocks = pImage->cbSize / pImage->cbBlock;
     1146    uint64_t uChunkRatio64 = (RT_BIT_64(23) * pImage->cbLogicalSector) / pImage->cbBlock;
     1147    uChunkRatio = (uint32_t)uChunkRatio64; Assert(uChunkRatio == uChunkRatio64);
     1148    uint64_t cDataBlocks64 = pImage->cbSize / pImage->cbBlock;
     1149    cDataBlocks = (uint32_t)cDataBlocks64; Assert(cDataBlocks == cDataBlocks64);
     1150
    11481151    if (pImage->cbSize % pImage->cbBlock)
    11491152        cDataBlocks++;
     
    18951898    else
    18961899    {
    1897         uint32_t idxBat = uOffset / pImage->cbBlock;
     1900        uint32_t idxBat = (uint32_t)(uOffset / pImage->cbBlock); Assert(idxBat == uOffset / pImage->cbBlock);
    18981901        uint32_t offRead = uOffset % pImage->cbBlock;
    18991902        uint64_t uBatEntry;
     
    24192422    if (pImage)
    24202423    {
    2421         vdIfErrorMessage(pImage->pIfError, "Header: Geometry PCHS=%u/%u/%u LCHS=%u/%u/%u cbSector=%zu\n",
     2424        vdIfErrorMessage(pImage->pIfError, "Header: Geometry PCHS=%u/%u/%u LCHS=%u/%u/%u cbSector=%u\n",
    24222425                        pImage->PCHSGeometry.cCylinders, pImage->PCHSGeometry.cHeads, pImage->PCHSGeometry.cSectors,
    24232426                        pImage->LCHSGeometry.cCylinders, pImage->LCHSGeometry.cHeads, pImage->LCHSGeometry.cSectors,
  • trunk/src/VBox/Storage/VMDK.cpp

    r48743 r48851  
    10351035{
    10361036    int rc = VINF_SUCCESS;
    1037     unsigned i;
     1037    size_t i;
    10381038    uint32_t *pGDTmp, *pRGDTmp;
    10391039    size_t cbGD = pExtent->cGDEntries * sizeof(uint32_t);
     
    23512351    size_t cbDescriptor = cbLimit ? cbLimit : 4 * _1K;
    23522352    char *pszDescriptor = (char *)RTMemAllocZ(cbDescriptor);
    2353     unsigned offDescriptor = 0;
     2353    size_t offDescriptor = 0;
    23542354
    23552355    if (!pszDescriptor)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette