VirtualBox

Changeset 62746 in vbox for trunk/src/VBox/Storage/QED.cpp


Ignore:
Timestamp:
Jul 30, 2016 3:59:55 PM (8 years ago)
Author:
vboxsync
Message:

Storage: warnings.

File:
1 edited

Legend:

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

    r62482 r62746  
    454454{
    455455    PQEDL2CACHEENTRY pL2Entry = NULL;
    456     int rc = VINF_SUCCESS;
    457456
    458457    if (pImage->cbL2Cache + pImage->cbTable <= QED_L2_CACHE_MEMORY_MAX)
     
    13191318                          unsigned uPercentStart, unsigned uPercentSpan)
    13201319{
     1320    RT_NOREF1(pszComment);
    13211321    int rc;
    13221322    int32_t fOpen;
     
    13981398static int qedAsyncClusterAllocRollback(PQEDIMAGE pImage, PVDIOCTX pIoCtx, PQEDCLUSTERASYNCALLOC pClusterAlloc)
    13991399{
     1400    RT_NOREF1(pIoCtx);
    14001401    int rc = VINF_SUCCESS;
    14011402
     
    15371538                                         PVDINTERFACE pVDIfsImage, VDTYPE *penmType)
    15381539{
     1540    RT_NOREF1(pVDIfsDisk);
    15391541    LogFlowFunc(("pszFilename=\"%s\" pVDIfsDisk=%#p pVDIfsImage=%#p\n", pszFilename, pVDIfsDisk, pVDIfsImage));
    15401542    PVDIOSTORAGE pStorage = NULL;
     
    15611563                           &pStorage);
    15621564    if (RT_SUCCESS(rc))
     1565    {
    15631566        rc = vdIfIoIntFileGetSize(pIfIo, pStorage, &cbFile);
    1564 
    1565     if (   RT_SUCCESS(rc)
    1566         && cbFile > sizeof(QedHeader))
    1567     {
    1568         QedHeader Header;
    1569 
    1570         rc = vdIfIoIntFileReadSync(pIfIo, pStorage, 0, &Header, sizeof(Header));
    15711567        if (   RT_SUCCESS(rc)
    1572             && qedHdrConvertToHostEndianess(&Header))
    1573         {
    1574             *penmType = VDTYPE_HDD;
    1575             rc = VINF_SUCCESS;
     1568            && cbFile > sizeof(QedHeader))
     1569        {
     1570            QedHeader Header;
     1571
     1572            rc = vdIfIoIntFileReadSync(pIfIo, pStorage, 0, &Header, sizeof(Header));
     1573            if (   RT_SUCCESS(rc)
     1574                && qedHdrConvertToHostEndianess(&Header))
     1575            {
     1576                *penmType = VDTYPE_HDD;
     1577                rc = VINF_SUCCESS;
     1578            }
     1579            else
     1580                rc = VERR_VD_GEN_INVALID_HEADER;
    15761581        }
    15771582        else
    15781583            rc = VERR_VD_GEN_INVALID_HEADER;
    15791584    }
    1580     else
    1581         rc = VERR_VD_GEN_INVALID_HEADER;
    15821585
    15831586    if (pStorage)
     
    16481651                                   void **ppBackendData)
    16491652{
     1653    RT_NOREF1(pUuid);
    16501654    LogFlowFunc(("pszFilename=\"%s\" cbSize=%llu uImageFlags=%#x pszComment=\"%s\" pPCHSGeometry=%#p pLCHSGeometry=%#p Uuid=%RTuuid uOpenFlags=%#x uPercentStart=%u uPercentSpan=%u pVDIfsDisk=%#p pVDIfsImage=%#p pVDIfsOperation=%#p enmType=%d ppBackendData=%#p",
    16511655                 pszFilename, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags, uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation, enmType, ppBackendData));
     
    18961900            do
    18971901            {
    1898                 uint64_t idxUpdateLe = 0;
    1899 
    19001902                /* Check if we have to allocate a new cluster for L2 tables. */
    19011903                if (!pImage->paL1Table[idxL1])
     
    22832285                                       size_t cbComment)
    22842286{
     2287    RT_NOREF2(pszComment, cbComment);
    22852288    LogFlowFunc(("pBackendData=%#p pszComment=%#p cbComment=%zu\n", pBackendData, pszComment, cbComment));
    22862289    PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     
    23012304static DECLCALLBACK(int) qedSetComment(void *pBackendData, const char *pszComment)
    23022305{
     2306    RT_NOREF1(pszComment);
    23032307    LogFlowFunc(("pBackendData=%#p pszComment=\"%s\"\n", pBackendData, pszComment));
    23042308    PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     
    23242328static DECLCALLBACK(int) qedGetUuid(void *pBackendData, PRTUUID pUuid)
    23252329{
     2330    RT_NOREF1(pUuid);
    23262331    LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
    23272332    PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     
    23422347static DECLCALLBACK(int) qedSetUuid(void *pBackendData, PCRTUUID pUuid)
    23432348{
     2349    RT_NOREF1(pUuid);
    23442350    LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
    23452351    PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     
    23662372static DECLCALLBACK(int) qedGetModificationUuid(void *pBackendData, PRTUUID pUuid)
    23672373{
     2374    RT_NOREF1(pUuid);
    23682375    LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
    23692376    PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     
    23842391static DECLCALLBACK(int) qedSetModificationUuid(void *pBackendData, PCRTUUID pUuid)
    23852392{
     2393    RT_NOREF1(pUuid);
    23862394    LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
    23872395    PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     
    24072415static DECLCALLBACK(int) qedGetParentUuid(void *pBackendData, PRTUUID pUuid)
    24082416{
     2417    RT_NOREF1(pUuid);
    24092418    LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
    24102419    PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     
    24252434static DECLCALLBACK(int) qedSetParentUuid(void *pBackendData, PCRTUUID pUuid)
    24262435{
     2436    RT_NOREF1(pUuid);
    24272437    LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
    24282438    PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     
    24482458static DECLCALLBACK(int) qedGetParentModificationUuid(void *pBackendData, PRTUUID pUuid)
    24492459{
     2460    RT_NOREF1(pUuid);
    24502461    LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
    24512462    PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     
    24662477static DECLCALLBACK(int) qedSetParentModificationUuid(void *pBackendData, PCRTUUID pUuid)
    24672478{
     2479    RT_NOREF1(pUuid);
    24682480    LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
    24692481    PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
     
    25772589                                   PVDINTERFACE pVDIfsOperation)
    25782590{
     2591    RT_NOREF7(pPCHSGeometry, pLCHSGeometry, uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation);
    25792592    PQEDIMAGE pImage = (PQEDIMAGE)pBackendData;
    25802593    int rc = VINF_SUCCESS;
    2581 
    2582     PVDINTERFACEPROGRESS pIfProgress = VDIfProgressGet(pVDIfsOperation);
    25832594
    25842595    /* Making the image smaller is not supported at the moment. */
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