VirtualBox

Changeset 103415 in vbox for trunk/src


Ignore:
Timestamp:
Feb 19, 2024 7:52:27 AM (12 months ago)
Author:
vboxsync
Message:

Additions,Main,VMM,Runtime: Fix some unused expression warnings, bugref:3409

Location:
trunk/src/VBox
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestCtrl.cpp

    r103165 r103415  
    17741774        pStartupInfo->psz##a_Str = (char *)RTMemRealloc(pStartupInfo->psz##a_Str, \
    17751775           RT_MIN(pStartupInfo->cb##a_Str * cGrowthFactor, a_cbMax)); \
    1776         AssertPtrBreakStmt(pStartupInfo->psz##a_Str, VERR_NO_MEMORY); \
     1776        AssertPtrBreakStmt(pStartupInfo->psz##a_Str, rc = VERR_NO_MEMORY); \
    17771777        pStartupInfo->cb##a_Str  = RT_MIN(pStartupInfo->cb##a_Str * cGrowthFactor, a_cbMax);
    17781778
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp

    r103413 r103415  
    14401440                        if (cbBufSize - cbBufUsed < cbTotal) /* Grow buffer, if needed. */
    14411441                        {
    1442                             AssertBreakStmt(cbTotal <= cbGrowSize, VERR_BUFFER_OVERFLOW);
     1442                            AssertBreakStmt(cbTotal <= cbGrowSize, rc = VERR_BUFFER_OVERFLOW);
    14431443                            pvBuf      = RTMemRealloc(pvBuf, cbBufSize + cbGrowSize);
    1444                             AssertPtrBreakStmt(pvBuf, VERR_NO_MEMORY);
     1444                            AssertPtrBreakStmt(pvBuf, rc = VERR_NO_MEMORY);
    14451445                            cbBufSize += cbGrowSize;
    14461446                        }
  • trunk/src/VBox/Devices/Audio/AudioTest.cpp

    r99739 r103415  
    23832383        }
    23842384
    2385         AssertBreakStmt(cbToCompare >= cbReadA, VERR_INTERNAL_ERROR);
     2385        AssertBreakStmt(cbToCompare >= cbReadA, rc = VERR_INTERNAL_ERROR);
    23862386        cbToCompare -= cbReadA;
    23872387        offCur      += cbReadA;
  • trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp

    r98103 r103415  
    14061406
    14071407                uint32_t const cbBeaconRemaining = AudioTestBeaconGetRemaining(pBeacon);
    1408                 AssertBreakStmt(cbBeaconRemaining, VERR_WRONG_ORDER);
     1408                AssertBreakStmt(cbBeaconRemaining, rc = VERR_WRONG_ORDER);
    14091409
    14101410                /* Limit to exactly one beacon (pre or post). */
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp

    r102944 r103415  
    22832283            pszDstCur = RTStrDup(pszDst);
    22842284
    2285         AssertPtrBreakStmt(pszDstCur, VERR_NO_MEMORY);
     2285        AssertPtrBreakStmt(pszDstCur, hrc = E_OUTOFMEMORY);
    22862286
    22872287        if (pCtx->cVerbose)
  • trunk/src/VBox/Main/glue/string.cpp

    r98297 r103415  
    606606    size_t cwcSrc;
    607607    int vrc = RTStrCalcUtf16LenEx(pszSrc, cchSrc, &cwcSrc);
    608     AssertRCStmt(vrc, E_INVALIDARG);
     608    AssertRCReturn(vrc, E_INVALIDARG);
    609609
    610610    size_t cwcOld = length();
     
    616616        PRTUTF16 pwszDst = &m_bstr[cwcOld];
    617617        vrc = RTStrToUtf16Ex(pszSrc, cchSrc, &pwszDst, cwcSrc + 1, NULL);
    618         AssertRCStmt(vrc, E_INVALIDARG);
     618        AssertRCReturn(vrc, E_INVALIDARG);
    619619    }
    620620    m_bstr[cwcTotal] = '\0';
  • trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp

    r98273 r103415  
    931931
    932932        const char *pcszSource = DnDTransferObjectGetSourcePath(pObj);
    933         AssertPtrBreakStmt(pcszSource, VERR_INVALID_POINTER);
     933        AssertPtrBreakStmt(pcszSource, vrc = VERR_INVALID_POINTER);
    934934
    935935        /** @todo Add sparse file support based on fFlags? (Use Open(..., fFlags | SPARSE). */
     
    10061006
    10071007        const char *pcszSource = DnDTransferObjectGetSourcePath(pObj);
    1008         AssertPtrBreakStmt(pcszSource, VERR_INVALID_POINTER);
     1008        AssertPtrBreakStmt(pcszSource, vrc = VERR_INVALID_POINTER);
    10091009
    10101010        AssertMsgReturn(DnDTransferObjectIsOpen(pObj),
  • trunk/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp

    r98278 r103415  
    10081008
    10091009        pvChunk += cbChunk;
    1010         AssertBreakStmt(cbData >= cbChunk, VERR_BUFFER_UNDERFLOW);
     1010        AssertBreakStmt(cbData >= cbChunk, vrc = VERR_BUFFER_UNDERFLOW);
    10111011        cbData  -= cbChunk;
    10121012    }
  • trunk/src/VBox/Runtime/common/dbg/dbgmodcodeview.cpp

    r103250 r103415  
    745745                    uint16_t off     = *uCursor.pu16++;
    746746                    uint16_t iSeg    = *uCursor.pu16++;
    747                     /*uint16_t iType   =*/ *uCursor.pu16++;
     747                    /*uint16_t iType   = * */ uCursor.pu16++;
    748748                    uint8_t  cchName = *uCursor.pu8++;
    749749                    RTDBGMODCV_CHECK_NOMSG_RET_BF(cchName > 0);
     
    761761                    uint32_t off     = *uCursor.pu32++;
    762762                    uint16_t iSeg    = *uCursor.pu16++;
    763                     /*uint16_t iType   =*/ *uCursor.pu16++;
     763                    /*uint16_t iType   = * */ uCursor.pu16++;
    764764                    uint8_t  cchName = *uCursor.pu8++;
    765765                    RTDBGMODCV_CHECK_NOMSG_RET_BF(cchName > 0);
     
    774774                {
    775775                    RTDBGMODCV_CHECK_NOMSG_RET_BF(cbRec > 2 + 4+4+4+2+2+2+2+2+2+1+1);
    776                     /*uint32_t uParent       =*/ *uCursor.pu32++;
    777                     /*uint32_t uEnd          =*/ *uCursor.pu32++;
    778                     /*uint32_t uNext         =*/ *uCursor.pu32++;
     776                    /*uint32_t uParent       = * */ uCursor.pu32++;
     777                    /*uint32_t uEnd          = * */ uCursor.pu32++;
     778                    /*uint32_t uNext         = * */ uCursor.pu32++;
    779779                    uint16_t cbProc        = *uCursor.pu16++;
    780                     /*uint16_t offDebugStart =*/ *uCursor.pu16++;
    781                     /*uint16_t offDebugEnd   =*/ *uCursor.pu16++;
     780                    /*uint16_t offDebugStart = * */ uCursor.pu16++;
     781                    /*uint16_t offDebugEnd   = * */ uCursor.pu16++;
    782782                    uint16_t off           = *uCursor.pu16++;
    783783                    uint16_t iSeg          = *uCursor.pu16++;
    784                     /*uint16_t iProcType     =*/ *uCursor.pu16++;
    785                     /*uint8_t fbType         =*/ *uCursor.pu8++;
     784                    /*uint16_t iProcType     = * */ uCursor.pu16++;
     785                    /*uint8_t fbType         = * */ uCursor.pu8++;
    786786                    uint8_t  cchName       = *uCursor.pu8++;
    787787                    RTDBGMODCV_CHECK_NOMSG_RET_BF(cchName > 0);
     
    796796                {
    797797                    RTDBGMODCV_CHECK_NOMSG_RET_BF(cbRec > 2 + 4+4+4+4+4+4+4+2+2+1+1);
    798                     /*uint32_t uParent       =*/ *uCursor.pu32++;
    799                     /*uint32_t uEnd          =*/ *uCursor.pu32++;
    800                     /*uint32_t uNext         =*/ *uCursor.pu32++;
    801                     /*uint32_t cbProc        =*/ *uCursor.pu32++;
    802                     /*uint32_t offDebugStart =*/ *uCursor.pu32++;
    803                     /*uint32_t offDebugEnd   =*/ *uCursor.pu32++;
     798                    /*uint32_t uParent       = * */ uCursor.pu32++;
     799                    /*uint32_t uEnd          = * */ uCursor.pu32++;
     800                    /*uint32_t uNext         = * */ uCursor.pu32++;
     801                    /*uint32_t cbProc        = * */ uCursor.pu32++;
     802                    /*uint32_t offDebugStart = * */ uCursor.pu32++;
     803                    /*uint32_t offDebugEnd   = * */ uCursor.pu32++;
    804804                    uint32_t off           = *uCursor.pu32++;
    805805                    uint16_t iSeg          = *uCursor.pu16++;
    806                     /*uint16_t iProcType     =*/ *uCursor.pu16++;
    807                     /*uint8_t fbType         =*/ *uCursor.pu8++;
     806                    /*uint16_t iProcType     = * */ uCursor.pu16++;
     807                    /*uint8_t fbType         = * */ uCursor.pu8++;
    808808                    uint8_t  cchName       = *uCursor.pu8++;
    809809                    RTDBGMODCV_CHECK_NOMSG_RET_BF(cchName > 0);
  • trunk/src/VBox/Runtime/common/log/tracelogreader.cpp

    r99739 r103415  
    11811181            {
    11821182                cbRet = pacbRawData[*pidxRawData];
    1183                 *pidxRawData++;
     1183                pidxRawData++;
    11841184            }
    11851185            else
  • trunk/src/VBox/Runtime/common/misc/fdt.cpp

    r103344 r103415  
    572572            return RTErrInfoSetF(pErrInfo, VERR_BUFFER_OVERFLOW, "Structs string too long to fit into target buffer");
    573573
    574         *pszStrSrc++;
     574        pszStrSrc++;
    575575        if (!cbLeft)
    576576            return RTErrInfoSetF(pErrInfo, VERR_FDT_DTB_STRUCTS_BLOCK_STRING_NOT_TERMINATED, "Structs block contains an unterminated string");
  • trunk/src/VBox/VMM/VMMR3/EM.cpp

    r103194 r103415  
    880880                if (   pVCpu->em.s.enmState == EMSTATE_DEBUG_GUEST_RAW
    881881                    || pVCpu->em.s.enmState == EMSTATE_DEBUG_HYPER)
    882                     AssertLogRelMsgFailedStmt(("Bad EM state."), VERR_EM_INTERNAL_ERROR);
     882                    AssertLogRelMsgFailedStmt(("Bad EM state."), rc = VERR_EM_INTERNAL_ERROR);
    883883#if !defined(VBOX_VMM_TARGET_ARMV8)
    884884                else if (pVCpu->em.s.enmState == EMSTATE_DEBUG_GUEST_HM)
  • trunk/src/VBox/VMM/VMMR3/VMMR3VTable.cpp

    r98103 r103415  
    7171{
    7272    void * volatile pvCaller = ASMReturnAddress();
    73     AssertLogRel(("Reserved VMM function table entry called from %p!\n", pvCaller ));
     73    AssertLogRelMsgFailed(("Reserved VMM function table entry called from %p!\n", pvCaller ));
    7474    return VERR_INTERNAL_ERROR;
    7575}
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