Index: trunk/src/VBox/HostDrivers/VBoxUSB/darwin/VBoxUSB.cpp
===================================================================
--- trunk/src/VBox/HostDrivers/VBoxUSB/darwin/VBoxUSB.cpp	(revision 63510)
+++ trunk/src/VBox/HostDrivers/VBoxUSB/darwin/VBoxUSB.cpp	(revision 63511)
@@ -314,4 +314,5 @@
 static kern_return_t VBoxUSBStart(struct kmod_info *pKModInfo, void *pvData)
 {
+    RT_NOREF(pKModInfo, pvData);
     int rc;
     Log(("VBoxUSBStart\n"));
@@ -367,5 +368,5 @@
 static kern_return_t VBoxUSBStop(struct kmod_info *pKModInfo, void *pvData)
 {
-    int rc;
+    RT_NOREF(pKModInfo, pvData);
     Log(("VBoxUSBStop: g_cInstances=%d\n", g_cInstances));
 
@@ -377,5 +378,5 @@
     VBoxUSBFilterTerm();
 
-    rc = RTSemFastMutexDestroy(g_Mtx);
+    int rc = RTSemFastMutexDestroy(g_Mtx);
     AssertRC(rc);
     g_Mtx = NIL_RTSEMFASTMUTEX;
@@ -391,5 +392,5 @@
 
 
-
+#ifdef LOG_ENABLED
 /**
  * Gets the name of a IOKit message.
@@ -400,8 +401,7 @@
 DECLINLINE(const char *) DbgGetIOKitMessageName(UInt32 enmMsg)
 {
-#ifdef DEBUG
     switch (enmMsg)
     {
-#define MY_CASE(enm) case enm: return #enm; break
+# define MY_CASE(enm) case enm: return #enm; break
         MY_CASE(kIOMessageServiceIsTerminated);
         MY_CASE(kIOMessageServiceIsSuspended);
@@ -439,9 +439,9 @@
         MY_CASE(kIOUSBMessageExpressCardCantWake);
 //        MY_CASE(kIOUSBMessageCompositeDriverReconfigured);
-#undef MY_CASE
-    }
-#endif /* DEBUG */
+# undef MY_CASE
+    }
     return "unknown";
 }
+#endif /* LOG_ENABLED */
 
 
@@ -465,4 +465,6 @@
     uint32_t cInstances = ASMAtomicIncU32(&g_cInstances);
     Log(("VBoxUSB::init([%p], %p) new g_cInstances=%d\n", this, pDictionary, cInstances));
+    RT_NOREF_PV(cInstances);
+
     if (IOService::init(pDictionary))
     {
@@ -605,4 +607,5 @@
         Log(("VBoxUSBClient::initWithTask([%p], %p(->%p:{.pid=%d}, %p, %#x) -> true; new g_cInstances=%d\n",
                  this, OwningTask, pProc, pProc ? proc_pid(pProc) : -1, pvSecurityId, u32Type, cInstances));
+        RT_NOREF_PV(cInstances);
         return true;
     }
@@ -977,4 +980,5 @@
     uint32_t cInstances = ASMAtomicIncU32(&g_cInstances);
     Log(("VBoxUSBDevice::init([%p], %p) new g_cInstances=%d\n", this, pDictionary, cInstances));
+    RT_NOREF_PV(cInstances);
 
     m_pDevice = NULL;
@@ -1339,5 +1343,5 @@
 {
     Log(("VBoxUSBDevice::message([%p], %#x {%s}, %p {%s}, %p) - pid=%d\n",
-             this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, RTProcSelf()));
+         this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, RTProcSelf()));
 
     IOReturn irc;
@@ -1472,5 +1476,5 @@
 
     Log(("VBoxUSBDevice::message([%p], %#x {%s}, %p {%s}, %p) -> %#x\n",
-             this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, irc));
+         this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, irc));
     return irc;
 }
@@ -1562,25 +1566,25 @@
                We'll also get a kIIOServiceRequestingClose message() for that...  */
             Log(("VBoxUSBDevice::MyInterestHandler: kIOMessageServiceIsAttemptingOpen - pvRefCon=%p pProvider=%p pvMsgArg=%p cbMsgArg=%d\n",
-                     pvRefCon, pProvider, pvMsgArg, cbMsgArg));
+                 pvRefCon, pProvider, pvMsgArg, cbMsgArg));
             break;
 
         case kIOMessageServiceWasClosed:
             Log(("VBoxUSBDevice::MyInterestHandler: kIOMessageServiceWasClosed - pvRefCon=%p pProvider=%p pvMsgArg=%p cbMsgArg=%d\n",
-                     pvRefCon, pProvider, pvMsgArg, cbMsgArg));
+                 pvRefCon, pProvider, pvMsgArg, cbMsgArg));
             break;
 
         case kIOMessageServiceIsTerminated:
             Log(("VBoxUSBDevice::MyInterestHandler: kIOMessageServiceIsTerminated - pvRefCon=%p pProvider=%p pvMsgArg=%p cbMsgArg=%d\n",
-                     pvRefCon, pProvider, pvMsgArg, cbMsgArg));
+                 pvRefCon, pProvider, pvMsgArg, cbMsgArg));
             break;
 
         case kIOUSBMessagePortHasBeenReset:
             Log(("VBoxUSBDevice::MyInterestHandler: kIOUSBMessagePortHasBeenReset - pvRefCon=%p pProvider=%p pvMsgArg=%p cbMsgArg=%d\n",
-                     pvRefCon, pProvider, pvMsgArg, cbMsgArg));
+                 pvRefCon, pProvider, pvMsgArg, cbMsgArg));
             break;
 
         default:
             Log(("VBoxUSBDevice::MyInterestHandler: %#x (%s) - pvRefCon=%p pProvider=%p pvMsgArg=%p cbMsgArg=%d\n",
-                     enmMsgType, DbgGetIOKitMessageName(enmMsgType), pvRefCon, pProvider, pvMsgArg, cbMsgArg));
+                 enmMsgType, DbgGetIOKitMessageName(enmMsgType), pvRefCon, pProvider, pvMsgArg, cbMsgArg));
             break;
     }
@@ -1617,4 +1621,5 @@
     uint32_t cInstances = ASMAtomicIncU32(&g_cInstances);
     Log(("VBoxUSBInterface::init([%p], %p) new g_cInstances=%d\n", this, pDictionary, cInstances));
+    RT_NOREF_PV(cInstances);
 
     m_pInterface = NULL;
@@ -1781,5 +1786,5 @@
 {
     Log(("VBoxUSBInterface::message([%p], %#x {%s}, %p {%s}, %p)\n",
-             this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg));
+         this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg));
 
     IOReturn irc;
@@ -1865,5 +1870,5 @@
 
     Log(("VBoxUSBInterface::message([%p], %#x {%s}, %p {%s}, %p) -> %#x\n",
-             this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, irc));
+         this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, irc));
     return irc;
 }
