Index: trunk/src/VBox/Devices/USB/USBProxyDevice.cpp
===================================================================
--- trunk/src/VBox/Devices/USB/USBProxyDevice.cpp	(revision 62960)
+++ trunk/src/VBox/Devices/USB/USBProxyDevice.cpp	(revision 62992)
@@ -357,5 +357,4 @@
     uint32_t altmap[4] = {0,};
     uint8_t *tmp, *end = buf + len;
-    uint8_t *orig_desc = buf;
     uint8_t alt;
     int state;
@@ -762,4 +761,5 @@
 static DECLCALLBACK(void) usbProxyDestruct(PPDMUSBINS pUsbIns)
 {
+    PDMUSB_CHECK_VERSIONS_RETURN_VOID(pUsbIns);
     PUSBPROXYDEV pThis = PDMINS_2_DATA(pUsbIns, PUSBPROXYDEV);
     Log(("usbProxyDestruct: destroying pProxyDev=%s\n", pUsbIns->pszName));
@@ -859,4 +859,6 @@
 static DECLCALLBACK(int) usbProxyConstruct(PPDMUSBINS pUsbIns, int iInstance, PCFGMNODE pCfg, PCFGMNODE pCfgGlobal)
 {
+    PDMUSB_CHECK_VERSIONS_RETURN(pUsbIns);
+    RT_NOREF(iInstance);
     PUSBPROXYDEV pThis = PDMINS_2_DATA(pUsbIns, PUSBPROXYDEV);
     LogFlow(("usbProxyConstruct: pUsbIns=%p iInstance=%d\n", pUsbIns, iInstance));
Index: trunk/src/VBox/Devices/USB/win/USBProxyDevice-win.cpp
===================================================================
--- trunk/src/VBox/Devices/USB/win/USBProxyDevice-win.cpp	(revision 62960)
+++ trunk/src/VBox/Devices/USB/win/USBProxyDevice-win.cpp	(revision 62992)
@@ -79,5 +79,5 @@
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
-static int usbProxyWinSetInterface(PUSBPROXYDEV p, int ifnum, int setting);
+static int usbProxyWinSetInterface(PUSBPROXYDEV p, int iIf, int setting);
 
 /**
@@ -90,5 +90,7 @@
 static int usbProxyWinHandleUnpluggedDevice(PUSBPROXYDEV pProxyDev, DWORD dwErr)
 {
-    PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32);
+#ifdef LOG_ENABLED
+    PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32);
+#endif
 
     if (   dwErr == ERROR_INVALID_HANDLE_STATE
@@ -110,4 +112,5 @@
 static DECLCALLBACK(int) usbProxyWinOpen(PUSBPROXYDEV pProxyDev, const char *pszAddress, void *pvBackend)
 {
+    RT_NOREF(pvBackend);
     PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32);
 
@@ -140,6 +143,9 @@
             if (DeviceIoControl(pPriv->hDev, SUPUSB_IOCTL_GET_VERSION, NULL, 0, &version, sizeof(version), &cbReturned, NULL))
             {
-                if (!(    version.u32Major != USBDRV_MAJOR_VERSION
-                      ||  version.u32Minor <  USBDRV_MINOR_VERSION))
+                if (    version.u32Major == USBDRV_MAJOR_VERSION
+#if USBDRV_MINOR_VERSION != 0
+                    &&  version.u32Minor >=  USBDRV_MINOR_VERSION
+#endif
+                   )
                 {
                     USBSUP_CLAIMDEV in;
@@ -245,4 +251,5 @@
 static DECLCALLBACK(int) usbProxyWinReset(PUSBPROXYDEV pProxyDev, bool fResetOnLinux)
 {
+    RT_NOREF(fResetOnLinux);
     PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32);
     DWORD cbReturned;
@@ -302,5 +309,5 @@
 }
 
-static DECLCALLBACK(int) usbProxyWinClaimInterface(PUSBPROXYDEV pProxyDev, int ifnum)
+static DECLCALLBACK(int) usbProxyWinClaimInterface(PUSBPROXYDEV pProxyDev, int iIf)
 {
     /* Called just before we use an interface. Needed on Linux to claim
@@ -311,5 +318,5 @@
     PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32);
 
-    pPriv->bInterfaceNumber = ifnum;
+    pPriv->bInterfaceNumber = iIf;
 
     Assert(pPriv);
@@ -317,14 +324,12 @@
 }
 
-static DECLCALLBACK(int) usbProxyWinReleaseInterface(PUSBPROXYDEV pProxyDev, int ifnum)
-{
+static DECLCALLBACK(int) usbProxyWinReleaseInterface(PUSBPROXYDEV pProxyDev, int iIf)
+{
+    RT_NOREF(pProxyDev, iIf);
     /* The opposite of claim_interface. */
-    PPRIV_USBW32 pPriv = USBPROXYDEV_2_DATA(pProxyDev, PPRIV_USBW32);
-
-    Assert(pPriv);
     return VINF_SUCCESS;
 }
 
-static DECLCALLBACK(int) usbProxyWinSetInterface(PUSBPROXYDEV pProxyDev, int ifnum, int setting)
+static DECLCALLBACK(int) usbProxyWinSetInterface(PUSBPROXYDEV pProxyDev, int iIf, int setting)
 {
     /* Select an alternate setting for an interface, the same applies
@@ -338,6 +343,6 @@
     Assert(pPriv);
 
-    Log(("usbproxy: Select interface of %x to %d/%d\n", pPriv->hDev, ifnum, setting));
-    in.bInterfaceNumber  = ifnum;
+    Log(("usbproxy: Select interface of %x to %d/%d\n", pPriv->hDev, iIf, setting));
+    in.bInterfaceNumber  = iIf;
     in.bAlternateSetting = setting;
 
@@ -559,5 +564,6 @@
             /* Wait for the wakeup call. */
             DWORD cMilliesWait = cMillies == RT_INDEFINITE_WAIT ? INFINITE : cMillies;
-            DWORD rc = WaitForMultipleObjects(1, &pPriv->hEventWakeup, FALSE, cMilliesWait);
+            DWORD dwRc = WaitForMultipleObjects(1, &pPriv->hEventWakeup, FALSE, cMilliesWait);
+            NOREF(dwRc);
         }
 
@@ -630,5 +636,6 @@
     }
 
-    if (rc >= WAIT_OBJECT_0 && rc < WAIT_OBJECT_0 + cQueuedUrbs)
+    AssertCompile(WAIT_OBJECT_0 == 0);
+    if (/*rc >= WAIT_OBJECT_0 && */ rc < WAIT_OBJECT_0 + cQueuedUrbs)
     {
         RTCritSectEnter(&pPriv->CritSect);
