VirtualBox

Changeset 62962 in vbox


Ignore:
Timestamp:
Aug 4, 2016 9:00:52 AM (8 years ago)
Author:
vboxsync
Message:

Devices: warnings

Location:
trunk/src/VBox/Devices
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevE1000.cpp

    r62632 r62962  
    26892689static int e1kRegWriteEECD(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint32_t value)
    26902690{
     2691    RT_NOREF(offset, index);
    26912692#ifdef IN_RING3
    26922693    /* So far we are concerned with lower byte only */
     
    27072708    return VINF_SUCCESS;
    27082709#else /* !IN_RING3 */
    2709     RT_NOREF_PV(pThis); RT_NOREF_PV(offset); RT_NOREF_PV(index); RT_NOREF_PV(value);
     2710    RT_NOREF(pThis, value);
    27102711    return VINF_IOM_R3_MMIO_WRITE;
    27112712#endif /* !IN_RING3 */
     
    31913192
    31923193#ifdef IN_RING3
    3193 #ifdef E1K_TX_DELAY
    3194 
     3194
     3195# ifdef E1K_TX_DELAY
    31953196/**
    31963197 * Transmit Delay Timer handler.
     
    32093210
    32103211    E1K_INC_ISTAT_CNT(pThis->uStatTxDelayExp);
    3211 #ifdef E1K_INT_STATS
     3212#  ifdef E1K_INT_STATS
    32123213    uint64_t u64Elapsed = RTTimeNanoTS() - pThis->u64ArmedAt;
    32133214    if (u64Elapsed > pThis->uStatMaxTxDelay)
    32143215        pThis->uStatMaxTxDelay = u64Elapsed;
    3215 #endif
     3216#  endif
    32163217    int rc = e1kXmitPending(pThis, false /*fOnWorkerThread*/);
    32173218    AssertMsg(RT_SUCCESS(rc) || rc == VERR_TRY_AGAIN, ("%Rrc\n", rc));
    32183219}
    3219 #endif /* E1K_TX_DELAY */
    3220 
    3221 #ifdef E1K_USE_TX_TIMERS
     3220# endif /* E1K_TX_DELAY */
     3221
     3222# ifdef E1K_USE_TX_TIMERS
    32223223
    32233224/**
     
    32373238    E1K_INC_ISTAT_CNT(pThis->uStatTID);
    32383239    /* Cancel absolute delay timer as we have already got attention */
    3239 #ifndef E1K_NO_TAD
     3240#  ifndef E1K_NO_TAD
    32403241    e1kCancelTimer(pThis, pThis->CTX_SUFF(pTADTimer));
    3241 #endif /* E1K_NO_TAD */
     3242#  endif /* E1K_NO_TAD */
    32423243    e1kRaiseInterrupt(pThis, ICR_TXDW);
    32433244}
     
    32633264}
    32643265
    3265 #endif /* E1K_USE_TX_TIMERS */
    3266 #ifdef E1K_USE_RX_TIMERS
     3266# endif /* E1K_USE_TX_TIMERS */
     3267# ifdef E1K_USE_RX_TIMERS
    32673268
    32683269/**
     
    33063307}
    33073308
    3308 #endif /* E1K_USE_RX_TIMERS */
     3309# endif /* E1K_USE_RX_TIMERS */
    33093310
    33103311/**
     
    33183319static DECLCALLBACK(void) e1kLateIntTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
    33193320{
     3321    RT_NOREF(pDevIns, pTimer);
    33203322    PE1KSTATE pThis = (PE1KSTATE )pvUser;
    33213323
     
    33233325    STAM_COUNTER_INC(&pThis->StatLateInts);
    33243326    E1K_INC_ISTAT_CNT(pThis->uStatIntLate);
    3325 #if 0
     3327# if 0
    33263328    if (pThis->iStatIntLost > -100)
    33273329        pThis->iStatIntLost--;
    3328 #endif
     3330# endif
    33293331    e1kRaiseInterrupt(pThis, VERR_SEM_BUSY, 0);
    33303332    STAM_PROFILE_ADV_STOP(&pThis->StatLateIntTimer, a);
     
    33413343static DECLCALLBACK(void) e1kLinkUpTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
    33423344{
     3345    RT_NOREF(pDevIns, pTimer);
    33433346    PE1KSTATE pThis = (PE1KSTATE )pvUser;
    33443347
     
    53105313    E1kLog2(("%s e1kTxQueueConsumer:\n", pThis->szPrf));
    53115314
    5312     int rc = e1kXmitPending(pThis, false /*fOnWorkerThread*/);
     5315    int rc = e1kXmitPending(pThis, false /*fOnWorkerThread*/); NOREF(rc);
    53135316#ifndef DEBUG_andy /** @todo r=andy Happens for me a lot, mute this for me. */
    53145317    AssertMsg(RT_SUCCESS(rc) || rc == VERR_TRY_AGAIN, ("%Rrc\n", rc));
     
    53225325static DECLCALLBACK(bool) e1kCanRxQueueConsumer(PPDMDEVINS pDevIns, PPDMQUEUEITEMCORE pItem)
    53235326{
     5327    RT_NOREF(pItem);
    53245328    e1kWakeupReceive(pDevIns);
    53255329    return true;
     
    60166020static void e1kDumpState(PE1KSTATE pThis)
    60176021{
     6022    RT_NOREF(pThis);
    60186023    for (int i = 0; i < E1K_NUM_OF_32BIT_REGS; ++i)
    6019     {
    6020         E1kLog2(("%s %8.8s = %08x\n", pThis->szPrf,
    6021                 g_aE1kRegMap[i].abbrev, pThis->auRegs[i]));
    6022     }
     6024        E1kLog2(("%s %8.8s = %08x\n", pThis->szPrf, g_aE1kRegMap[i].abbrev, pThis->auRegs[i]));
    60236025# ifdef E1K_INT_STATS
    60246026    LogRel(("%s Interrupt attempts: %d\n", pThis->szPrf, pThis->uStatIntTry));
     
    60696071static DECLCALLBACK(int) e1kMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
    60706072{
     6073    RT_NOREF(iRegion);
    60716074    PE1KSTATE pThis = PDMINS_2_DATA(pPciDev->pDevIns, E1KSTATE*);
    60726075    int       rc;
     
    65796582static DECLCALLBACK(int) e1kLiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
    65806583{
     6584    RT_NOREF(uPass);
    65816585    PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*);
    65826586    e1kSaveConfig(pThis, pSSM);
     
    65896593static DECLCALLBACK(int) e1kSavePrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
    65906594{
     6595    RT_NOREF(pSSM);
    65916596    PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*);
    65926597
     
    66936698static DECLCALLBACK(int) e1kLoadPrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
    66946699{
     6700    RT_NOREF(pSSM);
    66956701    PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*);
    66966702
     
    68116817static DECLCALLBACK(int) e1kLoadDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
    68126818{
     6819    RT_NOREF(pSSM);
    68136820    PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*);
    68146821
     
    68486855                                         void *pvUser)
    68496856{
     6857    RT_NOREF(cchWidth,  cchPrecision,  fFlags, pvUser);
    68506858    AssertReturn(strcmp(pszType, "e1krxd") == 0, 0);
    68516859    E1KRXDESC* pDesc = (E1KRXDESC*)pvValue;
     
    68866894                                         void *pvUser)
    68876895{
     6896    RT_NOREF(cchWidth, cchPrecision, fFlags, pvUser);
    68886897    AssertReturn(strcmp(pszType, "e1ktxd") == 0, 0);
    68896898    E1KTXDESC *pDesc = (E1KTXDESC*)pvValue;
     
    69856994static DECLCALLBACK(void) e1kInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
    69866995{
     6996    RT_NOREF(pszArgs);
    69876997    PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*);
    69886998    unsigned  i;
     
    71457155static DECLCALLBACK(void) e1kR3Detach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
    71467156{
     7157    RT_NOREF(fFlags);
    71477158    PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*);
    71487159    Log(("%s e1kR3Detach:\n", pThis->szPrf));
     
    71817192static DECLCALLBACK(int) e1kR3Attach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
    71827193{
     7194    RT_NOREF(fFlags);
    71837195    PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*);
    71847196    LogFlow(("%s e1kR3Attach:\n",  pThis->szPrf));
     
    72957307static DECLCALLBACK(void) e1kR3Relocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
    72967308{
     7309    RT_NOREF(offDelta);
    72977310    PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*);
    72987311    pThis->pDevInsRC     = PDMDEVINS_2_RCPTR(pDevIns);
  • trunk/src/VBox/Devices/Network/DevVirtioNet.cpp

    r62632 r62962  
    539539static DECLCALLBACK(void) vnetLinkUpTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
    540540{
     541    RT_NOREF(pTimer);
    541542    PVNETSTATE pThis = (PVNETSTATE)pvUser;
    542543
     
    559560static DECLCALLBACK(bool) vnetCanRxQueueConsumer(PPDMDEVINS pDevIns, PPDMQUEUEITEMCORE pItem)
    560561{
     562    RT_NOREF(pItem);
    561563    vnetWakeupReceive(pDevIns);
    562564    return true;
     
    10681070static DECLCALLBACK(void) vnetQueueReceive(void *pvState, PVQUEUE pQueue)
    10691071{
     1072    RT_NOREF(pQueue);
    10701073    PVNETSTATE pThis = (PVNETSTATE)pvState;
    10711074    Log(("%s Receive buffers has been added, waking up receive thread.\n", INSTANCE(pThis)));
     
    13201323    if (TMTimerIsActive(pThis->CTX_SUFF(pTxTimer)))
    13211324    {
    1322         int rc = TMTimerStop(pThis->CTX_SUFF(pTxTimer));
     1325        TMTimerStop(pThis->CTX_SUFF(pTxTimer));
    13231326        Log3(("%s vnetQueueTransmit: Got kicked with notification disabled, re-enable notification and flush TX queue\n", INSTANCE(pThis)));
    13241327        vnetTransmitPendingPackets(pThis, pQueue, false /*fOnWorkerThread*/);
     
    13501353static DECLCALLBACK(void) vnetTxTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
    13511354{
     1355    RT_NOREF(pDevIns, pTimer);
    13521356    PVNETSTATE pThis = (PVNETSTATE)pvUser;
    13531357
     
    15381542    while (vqueueGet(&pThis->VPCI, pQueue, &elem))
    15391543    {
    1540         unsigned int uOffset = 0;
    15411544        if (elem.nOut < 1 || elem.aSegsOut[0].cb < sizeof(VNETCTLHDR))
    15421545        {
     
    16021605static DECLCALLBACK(int) vnetLiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass)
    16031606{
     1607    RT_NOREF(uPass);
    16041608    PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE);
    16051609    vnetSaveConfig(pThis, pSSM);
     
    16131617static DECLCALLBACK(int) vnetSavePrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
    16141618{
     1619    RT_NOREF(pSSM);
    16151620    PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE);
    16161621
     
    16611666static DECLCALLBACK(int) vnetLoadPrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
    16621667{
     1668    RT_NOREF(pSSM);
    16631669    PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE);
    16641670
     
    17391745static DECLCALLBACK(int) vnetLoadDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
    17401746{
     1747    RT_NOREF(pSSM);
    17411748    PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE);
    17421749
     
    17601767 * @callback_method_impl{FNPCIIOREGIONMAP}
    17611768 */
    1762 static DECLCALLBACK(int) vnetMap(PPCIDEVICE pPciDev, int iRegion,
    1763                                  RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
    1764 {
     1769static DECLCALLBACK(int) vnetMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType)
     1770{
     1771    RT_NOREF(iRegion);
    17651772    PVNETSTATE pThis = PDMINS_2_DATA(pPciDev->pDevIns, PVNETSTATE);
    17661773    int       rc;
     
    17991806static DECLCALLBACK(void) vnetDetach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
    18001807{
     1808    RT_NOREF(fFlags);
    18011809    PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE);
    18021810    Log(("%s vnetDetach:\n", INSTANCE(pThis)));
     
    18261834static DECLCALLBACK(int) vnetAttach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
    18271835{
     1836    RT_NOREF(fFlags);
    18281837    PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE);
    18291838    LogFlow(("%s vnetAttach:\n",  INSTANCE(pThis)));
     
    20662075
    20672076    pThis->u32i = pThis->u32AvgDiff = pThis->u32MaxDiff = 0;
    2068     pThis->u32MinDiff = ~0;
     2077    pThis->u32MinDiff = UINT32_MAX;
    20692078#endif /* VNET_TX_DELAY */
    20702079
  • trunk/src/VBox/Devices/Network/DrvNetShaper.cpp

    r62511 r62962  
    313313static DECLCALLBACK(RTRCPTR) drvR3NetShaperIBaseRC_QueryInterface(PPDMIBASERC pInterface, const char *pszIID)
    314314{
     315    RT_NOREF(pInterface, pszIID);
    315316    return NIL_RTRCPTR;
    316317}
     
    338339static DECLCALLBACK(void) drvR3NetShaperDetach(PPDMDRVINS pDrvIns, uint32_t fFlags)
    339340{
     341    RT_NOREF(fFlags);
    340342    PDRVNETSHAPER pThis = PDMINS_2_DATA(pDrvIns, PDRVNETSHAPER);
    341343
  • trunk/src/VBox/Devices/Network/DrvUDPTunnel.cpp

    r62511 r62962  
    113113static DECLCALLBACK(int) drvUDPTunnelUp_BeginXmit(PPDMINETWORKUP pInterface, bool fOnWorkerThread)
    114114{
     115    RT_NOREF(fOnWorkerThread);
    115116    PDRVUDPTUNNEL pThis = PDMINETWORKUP_2_DRVUDPTUNNEL(pInterface);
    116117    int rc = RTCritSectTryEnter(&pThis->XmitLock);
     
    127128 */
    128129static DECLCALLBACK(int) drvUDPTunnelUp_AllocBuf(PPDMINETWORKUP pInterface, size_t cbMin,
    129                                                   PCPDMNETWORKGSO pGso, PPPDMSCATTERGATHER ppSgBuf)
     130                                                 PCPDMNETWORKGSO pGso, PPPDMSCATTERGATHER ppSgBuf)
    130131{
    131132    PDRVUDPTUNNEL pThis = PDMINETWORKUP_2_DRVUDPTUNNEL(pInterface);
    132     Assert(RTCritSectIsOwner(&pThis->XmitLock));
     133    Assert(RTCritSectIsOwner(&pThis->XmitLock)); NOREF(pThis);
    133134
    134135    /*
     
    175176{
    176177    PDRVUDPTUNNEL pThis = PDMINETWORKUP_2_DRVUDPTUNNEL(pInterface);
    177     Assert(RTCritSectIsOwner(&pThis->XmitLock));
     178    Assert(RTCritSectIsOwner(&pThis->XmitLock)); NOREF(pThis);
    178179    if (pSgBuf)
    179180    {
     
    191192static DECLCALLBACK(int) drvUDPTunnelUp_SendBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf, bool fOnWorkerThread)
    192193{
     194    RT_NOREF(fOnWorkerThread);
    193195    PDRVUDPTUNNEL pThis = PDMINETWORKUP_2_DRVUDPTUNNEL(pInterface);
    194196    STAM_COUNTER_INC(&pThis->StatPktSent);
     
    224226        uint32_t const  cSegs   = PDMNetGsoCalcSegmentCount(pGso, pSgBuf->cbUsed);  Assert(cSegs > 1);
    225227        rc = VINF_SUCCESS;
    226         for (size_t iSeg = 0; iSeg < cSegs; iSeg++)
     228        for (uint32_t iSeg = 0; iSeg < cSegs; iSeg++)
    227229        {
    228230            uint32_t cbSegFrame;
     
    264266static DECLCALLBACK(void) drvUDPTunnelUp_SetPromiscuousMode(PPDMINETWORKUP pInterface, bool fPromiscuous)
    265267{
     268    RT_NOREF(pInterface, fPromiscuous);
    266269    LogFlowFunc(("fPromiscuous=%d\n", fPromiscuous));
    267270    /* nothing to do */
     
    450453static DECLCALLBACK(int) drvUDPTunnelConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    451454{
     455    RT_NOREF(fFlags);
     456    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    452457    PDRVUDPTUNNEL pThis = PDMINS_2_DATA(pDrvIns, PDRVUDPTUNNEL);
    453     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    454458
    455459    /*
  • trunk/src/VBox/Devices/VirtIO/Virtio.cpp

    r62618 r62962  
    917917void vpciRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
    918918{
    919     VPCISTATE* pState = PDMINS_2_DATA(pDevIns, VPCISTATE*);
    920     pState->pDevInsRC     = PDMDEVINS_2_RCPTR(pDevIns);
     919    RT_NOREF(offDelta);
     920    VPCISTATE *pState = PDMINS_2_DATA(pDevIns, VPCISTATE*);
     921    pState->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
    921922    // TBD
    922923}
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