VirtualBox

Ignore:
Timestamp:
Apr 18, 2020 6:20:34 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137329
Message:

VBoxUSB: VC++ 14.1 adjustments and warnings (and some cleanups). bugref:8489

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxUSB/win/testcase/USBTest.cpp

    r82968 r83803  
    7979    int rc = -1;
    8080    SC_HANDLE   hSMgr = OpenSCManager(NULL, NULL, SERVICE_STOP | SERVICE_QUERY_STATUS);
    81     DWORD LastError = GetLastError(); NOREF(LastError);
    82     AssertMsg(hSMgr, ("OpenSCManager(,,delete) failed rc=%d\n", LastError));
     81    AssertMsg(hSMgr, ("OpenSCManager(,,delete) failed rc=%d\n", GetLastError()));
    8382    if (hSMgr)
    8483    {
     
    107106            }
    108107            else
    109             {
    110                 DWORD LastError = GetLastError(); NOREF(LastError);
    111                 AssertMsgFailed(("ControlService failed with LastError=%Rwa. status=%d\n", LastError, Status.dwCurrentState));
    112             }
     108                AssertMsgFailed(("ControlService failed with LastError=%Rwa. status=%d\n", GetLastError(), Status.dwCurrentState));
    113109            CloseServiceHandle(hService);
    114110        }
     
    116112            rc = 0;
    117113        else
    118         {
    119             DWORD LastError = GetLastError(); NOREF(LastError);
    120             AssertMsgFailed(("OpenService failed LastError=%Rwa\n", LastError));
    121         }
     114            AssertMsgFailed(("OpenService failed LastError=%Rwa\n", GetLastError()));
    122115        CloseServiceHandle(hSMgr);
    123116    }
    124117    return rc;
    125118}
     119
    126120/**
    127121 * Release specified USB device to the host.
     
    265259        {
    266260            /* AssertFailed(); */
    267             printf("usbproxy: Unable to open filter driver!! (rc=%d)\n", GetLastError());
     261            printf("usbproxy: Unable to open filter driver!! (rc=%lu)\n", GetLastError());
    268262            rc = VERR_FILE_NOT_FOUND;
    269263            goto failure;
     
    277271    if (!DeviceIoControl(g_hUSBMonitor, SUPUSBFLT_IOCTL_GET_VERSION, NULL, 0,&version, sizeof(version),  &cbReturned, NULL))
    278272    {
    279         printf("usbproxy: Unable to query filter version!! (rc=%d)\n", GetLastError());
     273        printf("usbproxy: Unable to query filter version!! (rc=%lu)\n", GetLastError());
    280274        rc = VERR_VERSION_MISMATCH;
    281275        goto failure;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette