VirtualBox

Changeset 103501 in vbox for trunk/src/VBox/Storage


Ignore:
Timestamp:
Feb 21, 2024 3:43:55 PM (9 months ago)
Author:
vboxsync
Message:

Storage/VDI.cpp: Fix harmless some parfait warnings, bugref:3409

File:
1 edited

Legend:

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

    r99739 r103501  
    480480    }
    481481
    482     if (   getImageLCHSGeometry(pHeader)
    483         && (getImageLCHSGeometry(pHeader))->cbSector != VDI_GEOMETRY_SECTOR_SIZE)
    484     {
    485         LogRel(("VDI: wrong sector size (%d != %d)\n",
    486                (getImageLCHSGeometry(pHeader))->cbSector, VDI_GEOMETRY_SECTOR_SIZE));
     482    PVDIDISKGEOMETRY pLCHSGeom = getImageLCHSGeometry(pHeader);
     483    if (   pLCHSGeom
     484        && pLCHSGeom->cbSector != VDI_GEOMETRY_SECTOR_SIZE)
     485    {
     486        LogRel(("VDI: wrong sector size (%d != %d)\n", pLCHSGeom->cbSector, VDI_GEOMETRY_SECTOR_SIZE));
    487487        fFailed = true;
    488488    }
     
    15131513    /* Check size. Maximum 4PB-3M. No tricks with adjusting the 1M block size
    15141514     * so far, which would extend the size. */
    1515     if (   !cbSize
    1516         || cbSize >= _1P * 4 - _1M * 3
     1515    if (   cbSize >= _1P * 4 - _1M * 3
    15171516        || cbSize < VDI_IMAGE_DEFAULT_BLOCK_SIZE
    15181517        || (cbSize % 512))
     
    25632562    /* Check size. Maximum 4PB-3M. No tricks with adjusting the 1M block size
    25642563     * so far, which would extend the size. */
    2565     if (   !cbSize
    2566         || cbSize >= _1P * 4 - _1M * 3
     2564    if (   cbSize >= _1P * 4 - _1M * 3
    25672565        || cbSize < VDI_IMAGE_DEFAULT_BLOCK_SIZE)
    25682566        return VERR_VD_INVALID_SIZE;
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