VirtualBox

Ignore:
Timestamp:
Aug 15, 2016 11:11:27 PM (8 years ago)
Author:
vboxsync
Message:

VBoxUSB: warnings (clang)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxUSB/darwin/VBoxUSB.cpp

    r62490 r63511  
    314314static kern_return_t VBoxUSBStart(struct kmod_info *pKModInfo, void *pvData)
    315315{
     316    RT_NOREF(pKModInfo, pvData);
    316317    int rc;
    317318    Log(("VBoxUSBStart\n"));
     
    367368static kern_return_t VBoxUSBStop(struct kmod_info *pKModInfo, void *pvData)
    368369{
    369     int rc;
     370    RT_NOREF(pKModInfo, pvData);
    370371    Log(("VBoxUSBStop: g_cInstances=%d\n", g_cInstances));
    371372
     
    377378    VBoxUSBFilterTerm();
    378379
    379     rc = RTSemFastMutexDestroy(g_Mtx);
     380    int rc = RTSemFastMutexDestroy(g_Mtx);
    380381    AssertRC(rc);
    381382    g_Mtx = NIL_RTSEMFASTMUTEX;
     
    391392
    392393
    393 
     394#ifdef LOG_ENABLED
    394395/**
    395396 * Gets the name of a IOKit message.
     
    400401DECLINLINE(const char *) DbgGetIOKitMessageName(UInt32 enmMsg)
    401402{
    402 #ifdef DEBUG
    403403    switch (enmMsg)
    404404    {
    405 #define MY_CASE(enm) case enm: return #enm; break
     405# define MY_CASE(enm) case enm: return #enm; break
    406406        MY_CASE(kIOMessageServiceIsTerminated);
    407407        MY_CASE(kIOMessageServiceIsSuspended);
     
    439439        MY_CASE(kIOUSBMessageExpressCardCantWake);
    440440//        MY_CASE(kIOUSBMessageCompositeDriverReconfigured);
    441 #undef MY_CASE
    442     }
    443 #endif /* DEBUG */
     441# undef MY_CASE
     442    }
    444443    return "unknown";
    445444}
     445#endif /* LOG_ENABLED */
    446446
    447447
     
    465465    uint32_t cInstances = ASMAtomicIncU32(&g_cInstances);
    466466    Log(("VBoxUSB::init([%p], %p) new g_cInstances=%d\n", this, pDictionary, cInstances));
     467    RT_NOREF_PV(cInstances);
     468
    467469    if (IOService::init(pDictionary))
    468470    {
     
    605607        Log(("VBoxUSBClient::initWithTask([%p], %p(->%p:{.pid=%d}, %p, %#x) -> true; new g_cInstances=%d\n",
    606608                 this, OwningTask, pProc, pProc ? proc_pid(pProc) : -1, pvSecurityId, u32Type, cInstances));
     609        RT_NOREF_PV(cInstances);
    607610        return true;
    608611    }
     
    977980    uint32_t cInstances = ASMAtomicIncU32(&g_cInstances);
    978981    Log(("VBoxUSBDevice::init([%p], %p) new g_cInstances=%d\n", this, pDictionary, cInstances));
     982    RT_NOREF_PV(cInstances);
    979983
    980984    m_pDevice = NULL;
     
    13391343{
    13401344    Log(("VBoxUSBDevice::message([%p], %#x {%s}, %p {%s}, %p) - pid=%d\n",
    1341              this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, RTProcSelf()));
     1345         this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, RTProcSelf()));
    13421346
    13431347    IOReturn irc;
     
    14721476
    14731477    Log(("VBoxUSBDevice::message([%p], %#x {%s}, %p {%s}, %p) -> %#x\n",
    1474              this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, irc));
     1478         this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, irc));
    14751479    return irc;
    14761480}
     
    15621566               We'll also get a kIIOServiceRequestingClose message() for that...  */
    15631567            Log(("VBoxUSBDevice::MyInterestHandler: kIOMessageServiceIsAttemptingOpen - pvRefCon=%p pProvider=%p pvMsgArg=%p cbMsgArg=%d\n",
    1564                      pvRefCon, pProvider, pvMsgArg, cbMsgArg));
     1568                 pvRefCon, pProvider, pvMsgArg, cbMsgArg));
    15651569            break;
    15661570
    15671571        case kIOMessageServiceWasClosed:
    15681572            Log(("VBoxUSBDevice::MyInterestHandler: kIOMessageServiceWasClosed - pvRefCon=%p pProvider=%p pvMsgArg=%p cbMsgArg=%d\n",
    1569                      pvRefCon, pProvider, pvMsgArg, cbMsgArg));
     1573                 pvRefCon, pProvider, pvMsgArg, cbMsgArg));
    15701574            break;
    15711575
    15721576        case kIOMessageServiceIsTerminated:
    15731577            Log(("VBoxUSBDevice::MyInterestHandler: kIOMessageServiceIsTerminated - pvRefCon=%p pProvider=%p pvMsgArg=%p cbMsgArg=%d\n",
    1574                      pvRefCon, pProvider, pvMsgArg, cbMsgArg));
     1578                 pvRefCon, pProvider, pvMsgArg, cbMsgArg));
    15751579            break;
    15761580
    15771581        case kIOUSBMessagePortHasBeenReset:
    15781582            Log(("VBoxUSBDevice::MyInterestHandler: kIOUSBMessagePortHasBeenReset - pvRefCon=%p pProvider=%p pvMsgArg=%p cbMsgArg=%d\n",
    1579                      pvRefCon, pProvider, pvMsgArg, cbMsgArg));
     1583                 pvRefCon, pProvider, pvMsgArg, cbMsgArg));
    15801584            break;
    15811585
    15821586        default:
    15831587            Log(("VBoxUSBDevice::MyInterestHandler: %#x (%s) - pvRefCon=%p pProvider=%p pvMsgArg=%p cbMsgArg=%d\n",
    1584                      enmMsgType, DbgGetIOKitMessageName(enmMsgType), pvRefCon, pProvider, pvMsgArg, cbMsgArg));
     1588                 enmMsgType, DbgGetIOKitMessageName(enmMsgType), pvRefCon, pProvider, pvMsgArg, cbMsgArg));
    15851589            break;
    15861590    }
     
    16171621    uint32_t cInstances = ASMAtomicIncU32(&g_cInstances);
    16181622    Log(("VBoxUSBInterface::init([%p], %p) new g_cInstances=%d\n", this, pDictionary, cInstances));
     1623    RT_NOREF_PV(cInstances);
    16191624
    16201625    m_pInterface = NULL;
     
    17811786{
    17821787    Log(("VBoxUSBInterface::message([%p], %#x {%s}, %p {%s}, %p)\n",
    1783              this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg));
     1788         this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg));
    17841789
    17851790    IOReturn irc;
     
    18651870
    18661871    Log(("VBoxUSBInterface::message([%p], %#x {%s}, %p {%s}, %p) -> %#x\n",
    1867              this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, irc));
     1872         this, enmMsg, DbgGetIOKitMessageName(enmMsg), pProvider, pProvider->getName(), pvArg, irc));
    18681873    return irc;
    18691874}
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