VirtualBox

Changeset 62958 in vbox


Ignore:
Timestamp:
Aug 4, 2016 7:54:03 AM (8 years ago)
Author:
vboxsync
Message:

Devices: warnings

Location:
trunk/src/VBox/Devices/USB
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/USB/DrvVUSBRootHub.cpp

    r62956 r62958  
    287287static DECLCALLBACK(int) vusbPDMHubDetachDevice(PPDMDRVINS pDrvIns, PPDMUSBINS pUsbIns, uint32_t iPort)
    288288{
     289    RT_NOREF(pDrvIns, iPort);
    289290    PVUSBDEV pDev = (PVUSBDEV)pUsbIns->pvVUsbDev2;
    290291    Assert(pDev);
     
    392393                             VUSBDIRECTION enmDir, uint32_t cbData, uint32_t cTds, const char *pszTag)
    393394{
     395    RT_NOREF(pszTag);
    394396    PVUSBURBPOOL pUrbPool = &pRh->Hub.Dev.UrbPool;
    395397
     
    564566static DECLCALLBACK(int) vusbRhR3PeriodFrameWorker(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
    565567{
     568    RT_NOREF(pDrvIns);
    566569    int rc = VINF_SUCCESS;
    567570    PVUSBROOTHUB pThis = (PVUSBROOTHUB)pThread->pvUser;
     
    619622static DECLCALLBACK(int) vusbRhR3PeriodFrameWorkerWakeup(PPDMDRVINS pDrvIns, PPDMTHREAD pThread)
    620623{
     624    RT_NOREF(pThread);
    621625    PVUSBROOTHUB pThis = PDMINS_2_DATA(pDrvIns, PVUSBROOTHUB);
    622626    return RTSemEventMultiSignal(pThis->hSemEventPeriodFrame);
     
    648652static DECLCALLBACK(int) vusbRhConnFreeUrb(PVUSBIROOTHUBCONNECTOR pInterface, PVUSBURB pUrb)
    649653{
    650     PVUSBROOTHUB pRh = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface);
    651 
     654    RT_NOREF(pInterface);
    652655    pUrb->pVUsb->pfnFree(pUrb);
    653656    return VINF_SUCCESS;
     
    768771static DECLCALLBACK(void) vusbRhReapAsyncUrbs(PVUSBIROOTHUBCONNECTOR pInterface, PVUSBIDEVICE pDevice, RTMSINTERVAL cMillies)
    769772{
    770     PVUSBROOTHUB pRh = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface);
     773    PVUSBROOTHUB pRh = VUSBIROOTHUBCONNECTOR_2_VUSBROOTHUB(pInterface); NOREF(pRh);
    771774    PVUSBDEV pDev = (PVUSBDEV)pDevice;
    772775
     
    994997 * @interface_method_impl{VUSBIDEVICE,pfnReset}
    995998 */
    996 static DECLCALLBACK(int) vusbRhDevReset(PVUSBIDEVICE pInterface, bool fResetOnLinux, PFNVUSBRESETDONE pfnDone, void *pvUser, PVM pVM)
    997 {
     999static DECLCALLBACK(int) vusbRhDevReset(PVUSBIDEVICE pInterface, bool fResetOnLinux,
     1000                                        PFNVUSBRESETDONE pfnDone, void *pvUser, PVM pVM)
     1001{
     1002    RT_NOREF(pfnDone, pvUser, pVM);
    9981003    PVUSBROOTHUB pRh = RT_FROM_MEMBER(pInterface, VUSBROOTHUB, Hub.Dev.IDevice);
    9991004    Assert(!pfnDone);
     
    12231228static DECLCALLBACK(int) vusbRhConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    12241229{
     1230    RT_NOREF(fFlags);
     1231    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    12251232    LogFlow(("vusbRhConstruct: Instance %d\n", pDrvIns->iInstance));
    12261233    PVUSBROOTHUB pThis = PDMINS_2_DATA(pDrvIns, PVUSBROOTHUB);
    1227     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    12281234
    12291235    /*
  • trunk/src/VBox/Devices/USB/VUSBBufferedPipe.cpp

    r62463 r62958  
    284284static int vusbBufferedPipeSetParamsFromDescriptor(PVUSBBUFFEREDPIPEINT pThis, PCVUSBDESCENDPOINT pDesc)
    285285{
    286     int rc = VINF_SUCCESS;
    287     unsigned cbPktMax, uInterval, uMult;
     286    unsigned cbPktMax;
     287    unsigned uInterval;
     288    unsigned uMult;
    288289
    289290    if (pThis->enmSpeed == VUSB_SPEED_HIGH)
     
    308309        /** @todo: Implement for super speed and up if it turns out to be required, at the moment it looks
    309310         * like we don't need it. */
    310         rc = VERR_NOT_SUPPORTED;
    311     }
    312 
    313     if (RT_SUCCESS(rc))
    314     {
    315         pThis->uInterval = uInterval;
    316         pThis->cbPktSize = cbPktMax * uMult;
    317         pThis->uEndPt    = pDesc->bEndpointAddress & 0xf;
    318 
    319         unsigned cPackets = pThis->cLatencyMs / pThis->uInterval;
    320         cPackets = RT_MAX(cPackets, 1); /* At least one packet. */
    321         pThis->cbRingBufData = pThis->cbPktSize * cPackets;
    322         pThis->cIsocDesc     = cPackets / 8 + ((cPackets % 8) ? 1 : 0);
    323     }
    324 
    325     return rc;
     311        return VERR_NOT_SUPPORTED;
     312    }
     313
     314    pThis->uInterval = uInterval;
     315    pThis->cbPktSize = cbPktMax * uMult;
     316    pThis->uEndPt    = pDesc->bEndpointAddress & 0xf;
     317
     318    unsigned cPackets = pThis->cLatencyMs / pThis->uInterval;
     319    cPackets = RT_MAX(cPackets, 1); /* At least one packet. */
     320    pThis->cbRingBufData = pThis->cbPktSize * cPackets;
     321    pThis->cIsocDesc     = cPackets / 8 + ((cPackets % 8) ? 1 : 0);
     322
     323    return VINF_SUCCESS;
    326324}
    327325
     
    410408            {
    411409                pIsocDesc->aIsocPkts[pIsocDesc->cIsocPkts].enmStatus = VUSBSTATUS_NOT_ACCESSED;
    412                 pIsocDesc->aIsocPkts[pIsocDesc->cIsocPkts].off = pIsocDesc->cbTotal;
     410                pIsocDesc->aIsocPkts[pIsocDesc->cIsocPkts].off = (uint16_t)pIsocDesc->cbTotal;
     411                Assert(pIsocDesc->aIsocPkts[pIsocDesc->cIsocPkts].off == pIsocDesc->cbTotal);
    413412                pIsocDesc->aIsocPkts[pIsocDesc->cIsocPkts].cb  = pUrb->aIsocPkts[i].cb;
    414413                pIsocDesc->cbTotal += pUrb->aIsocPkts[i].cb;
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