VirtualBox

Ignore:
Timestamp:
Jul 29, 2016 9:55:17 PM (9 years ago)
Author:
vboxsync
Message:

HostDrivers: warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.cpp

    r62490 r62715  
    156156void vboxUsbDbgPrintUnicodeString(PUNICODE_STRING pUnicodeString)
    157157{
    158     PWSTR pStr = pUnicodeString->Buffer;
    159     for (int i = 0; i < pUnicodeString->Length/2; ++i)
    160     {
    161         LOG(("%c", *pStr++));
    162     }
     158    RT_NOREF1(pUnicodeString);
     159    Log(("%.*ls", pUnicodeString->Length / 2, pUnicodeString->Buffer));
    163160}
    164161
     
    421418static DECLCALLBACK(VOID) vboxUsbObjDevNamePrefixMatcher(PDEVICE_OBJECT pDo, PUNICODE_STRING pName, PVOID pvMatcher)
    422419{
     420    RT_NOREF1(pDo);
    423421    PVBOXUSBOBJNAMEPREFIXMATCHER pData = (PVBOXUSBOBJNAMEPREFIXMATCHER)pvMatcher;
    424422    PUNICODE_STRING pNamePrefix = pData->pNamePrefix;
     
    438436static DECLCALLBACK(BOOLEAN) vboxUsbObjDevObjSearcherWalker(PDEVICE_OBJECT pTopDo, PDEVICE_OBJECT pCurDo, PVOID pvContext)
    439437{
     438    RT_NOREF1(pTopDo);
    440439    PVBOXUSBOBJDRVOBJSEARCHER pData = (PVBOXUSBOBJDRVOBJSEARCHER)pvContext;
    441440    ASSERT_WARN(!pData->pDevObj, ("non-null dev object (0x%p) on enter", pData->pDevObj));
     
    608607    }
    609608#else /* VBOX_USB3PORT */
     609    RT_NOREF1(fFlags);
    610610    PWSTR szwHubList;
    611611    Status = IoGetDeviceInterfaces(&GUID_DEVINTERFACE_USB_HUB, NULL, 0, &szwHubList);
     
    655655static DECLCALLBACK(BOOLEAN) vboxUsbMonFindHubDrvObjWalker(PFILE_OBJECT pFile, PDEVICE_OBJECT pTopDo, PDEVICE_OBJECT pHubDo, PVOID pvContext)
    656656{
     657    RT_NOREF2(pFile, pTopDo);
    657658    PVBOXUSBMONFINDHUBWALKER pData = (PVBOXUSBMONFINDHUBWALKER)pvContext;
    658659    PDRIVER_OBJECT pDrvObj = pHubDo->DriverObject;
     
    673674static PDRIVER_OBJECT vboxUsbMonHookFindHubDrvObj()
    674675{
    675     NTSTATUS Status = STATUS_UNSUCCESSFUL;
    676676    UNICODE_STRING szStandardHubName;
    677     PDRIVER_OBJECT pDrvObj = NULL;
    678677    szStandardHubName.Length = 0;
    679678    szStandardHubName.MaximumLength = 0;
     
    685684    vboxUsbMonHubDevWalk(vboxUsbMonFindHubDrvObjWalker, &Data, VBOXUSBMONHUBWALK_F_ALL);
    686685    if (Data.pDrvObj)
    687     {
    688686        LOG(("returning driver object 0x%p", Data.pDrvObj));
    689     }
    690687    else
    691     {
    692688        WARN(("no hub driver object found!"));
    693     }
    694689    return Data.pDrvObj;
    695690}
     
    770765                    ASSERT_WARN(Iqrl == PASSIVE_LEVEL, ("irql is not PASSIVE"));
    771766
    772                     switch (pSl->Parameters.QueryDeviceRelations.Type)
     767                    switch (pSl->Parameters.QueryId.IdType)
    773768                    {
    774769                        case BusQueryInstanceID:
     
    899894                        }
    900895                        break;
     896
     897                        default:
     898                            /** @todo r=bird: handle BusQueryContainerID and whatever else we might see  */
     899                            break;
    901900                    }
    902901                }
     
    11921191static DECLCALLBACK(BOOLEAN) vboxUsbMonHookDrvObjWalker(PFILE_OBJECT pFile, PDEVICE_OBJECT pTopDo, PDEVICE_OBJECT pHubDo, PVOID pvContext)
    11931192{
     1193    RT_NOREF3(pFile, pTopDo, pvContext);
    11941194    PDRIVER_OBJECT pDrvObj = pHubDo->DriverObject;
    11951195
     
    15191519static NTSTATUS _stdcall VBoxUsbMonCreate(PDEVICE_OBJECT pDevObj, PIRP pIrp)
    15201520{
     1521    RT_NOREF1(pDevObj);
    15211522    PIO_STACK_LOCATION pStack = IoGetCurrentIrpStackLocation(pIrp);
    15221523    PFILE_OBJECT pFileObj = pStack->FileObject;
     
    18661867static void _stdcall VBoxUsbMonUnload(PDRIVER_OBJECT pDrvObj)
    18671868{
     1869    RT_NOREF1(pDrvObj);
    18681870    LOG(("VBoxUSBMonUnload pDrvObj (0x%p)", pDrvObj));
    18691871
     
    18741876    UNICODE_STRING DosName;
    18751877    RtlInitUnicodeString(&DosName, USBMON_DEVICE_NAME_DOS);
    1876     NTSTATUS rc = IoDeleteSymbolicLink(&DosName);
     1878    IoDeleteSymbolicLink(&DosName);
    18771879
    18781880    IoDeleteDevice(g_VBoxUsbMonGlobals.pDevObj);
     
    18811883    PRTLOGGER pLogger = RTLogRelSetDefaultInstance(NULL);
    18821884    if (pLogger)
    1883     {
    18841885        RTLogDestroy(pLogger);
    1885     }
    18861886    pLogger = RTLogSetDefaultInstance(NULL);
    18871887    if (pLogger)
    1888     {
    18891888        RTLogDestroy(pLogger);
    1890     }
    18911889}
    18921890
     
    19041902NTSTATUS _stdcall DriverEntry(PDRIVER_OBJECT pDrvObj, PUNICODE_STRING pRegPath)
    19051903{
     1904    RT_NOREF1(pRegPath);
    19061905#ifdef VBOX_USB_WITH_VERBOSE_LOGGING
    19071906    RTLogGroupSettings(0, "+default.e.l.f.l2.l3");
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