VirtualBox

Changeset 62908 in vbox for trunk


Ignore:
Timestamp:
Aug 3, 2016 11:33:27 AM (8 years ago)
Author:
vboxsync
Message:

Devices: warnings

Location:
trunk/src/VBox/Devices
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DrvACPI.cpp

    r62679 r62908  
    127127{
    128128#if defined(RT_OS_WINDOWS)
     129    RT_NOREF(pInterface);
    129130    SYSTEM_POWER_STATUS powerStatus;
    130131    if (GetSystemPowerStatus(&powerStatus))
     
    163164
    164165#elif defined (RT_OS_DARWIN)
     166    RT_NOREF(pInterface);
    165167    *pPowerSource = PDM_ACPI_POWER_SOURCE_UNKNOWN;
    166168
     
    204206
    205207#elif defined(RT_OS_FREEBSD)
     208    RT_NOREF(pInterface);
    206209    int fAcLine = 0;
    207210    size_t cbParameter = sizeof(fAcLine);
     
    224227    }
    225228#else /* !RT_OS_FREEBSD either - what could this be? */
     229    RT_NOREF(pInterface);
    226230    *pPowerSource = PDM_ACPI_POWER_SOURCE_OUTLET;
    227231
     
    239243{
    240244    /* default return values for all architectures */
    241     *pfPresent              = false;   /* no battery present */
     245    *pfPresent              = false;        /* no battery present */
    242246    *penmBatteryState       = PDM_ACPI_BAT_STATE_CHARGED;
    243247    *penmRemainingCapacity  = PDM_ACPI_BAT_CAPACITY_UNKNOWN;
    244     *pu32PresentRate        = ~0;      /* present rate is unknown */
     248    *pu32PresentRate        = UINT32_MAX;   /* present rate is unknown */
    245249
    246250#if defined(RT_OS_WINDOWS)
     251    RT_NOREF(pInterface);
    247252    SYSTEM_POWER_STATUS powerStatus;
    248253    if (GetSystemPowerStatus(&powerStatus))
     
    280285
    281286#elif defined(RT_OS_DARWIN)
     287    RT_NOREF(pInterface);
    282288    CFTypeRef pBlob = IOPSCopyPowerSourcesInfo();
    283289    CFArrayRef pSources = IOPSCopyPowerSourcesList(pBlob);
     
    384390
    385391#elif defined(RT_OS_FREEBSD)
     392    RT_NOREF(pInterface);
    386393    /* We try to use /dev/acpi first and if that fails use the sysctls. */
    387394    bool fSuccess = true;
     
    947954static DECLCALLBACK(void) drvACPIDestruct(PPDMDRVINS pDrvIns)
    948955{
    949     PDRVACPI pThis = PDMINS_2_DATA(pDrvIns, PDRVACPI);
    950 
    951956    LogFlow(("drvACPIDestruct\n"));
    952957    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
    953958
    954959#ifdef RT_OS_LINUX
     960    PDRVACPI pThis = PDMINS_2_DATA(pDrvIns, PDRVACPI);
    955961    if (pThis->hPollerSleepEvent != NIL_RTSEMEVENT)
    956962    {
     
    969975static DECLCALLBACK(int) drvACPIConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    970976{
     977    RT_NOREF(fFlags);
     978    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    971979    PDRVACPI pThis = PDMINS_2_DATA(pDrvIns, PDRVACPI);
    972     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    973980    int rc = VINF_SUCCESS;
    974981
  • trunk/src/VBox/Devices/PC/DrvAcpiCpu.cpp

    r62509 r62908  
    4848static DECLCALLBACK(int) drvACPICpuConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    4949{
     50    RT_NOREF(fFlags);
    5051    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    5152
  • trunk/src/VBox/Devices/Serial/DrvChar.cpp

    r62507 r62908  
    103103/* -=-=-=-=- ICharConnector -=-=-=-=- */
    104104
    105 /** @copydoc PDMICHARCONNECTOR::pfnWrite */
     105/**
     106 * @interface_method_impl{PDMICHARCONNECTOR,pfnWrite}
     107 */
    106108static DECLCALLBACK(int) drvCharWrite(PPDMICHARCONNECTOR pInterface, const void *pvBuf, size_t cbWrite)
    107109{
     
    123125}
    124126
    125 /** @copydoc PDMICHARCONNECTOR::pfnSetParameters */
    126 static DECLCALLBACK(int) drvCharSetParameters(PPDMICHARCONNECTOR pInterface, unsigned Bps, char chParity, unsigned cDataBits, unsigned cStopBits)
    127 {
     127
     128/**
     129 * @interface_method_impl{PDMICHARCONNECTOR,pfnSetParameters}
     130 */
     131static DECLCALLBACK(int) drvCharSetParameters(PPDMICHARCONNECTOR pInterface, unsigned Bps, char chParity,
     132                                              unsigned cDataBits,  unsigned cStopBits)
     133{
     134    RT_NOREF(pInterface, Bps, chParity, cDataBits, cStopBits);
    128135    /*PDRVCHAR pThis = PDMICHAR_2_DRVCHAR(pInterface); - unused*/
    129136
     
    139146 *
    140147 * @returns 0 on success.
    141  * @param   ThreadSelf Thread handle to this thread.
     148 * @param   hThreadSelf Thread handle to this thread.
    142149 * @param   pvUser      User argument.
    143150 */
    144 static DECLCALLBACK(int) drvCharSendLoop(RTTHREAD ThreadSelf, void *pvUser)
    145 {
     151static DECLCALLBACK(int) drvCharSendLoop(RTTHREAD hThreadSelf, void *pvUser)
     152{
     153    RT_NOREF(hThreadSelf);
    146154    PDRVCHAR pThis = (PDRVCHAR)pvUser;
    147155
     
    189197}
    190198
     199
    191200/* -=-=-=-=- receive thread -=-=-=-=- */
    192201
     
    195204 *
    196205 * @returns 0 on success.
    197  * @param   ThreadSelf Thread handle to this thread.
     206 * @param   hThreadSelf Thread handle to this thread.
    198207 * @param   pvUser      User argument.
    199208 */
    200 static DECLCALLBACK(int) drvCharReceiveLoop(RTTHREAD ThreadSelf, void *pvUser)
    201 {
     209static DECLCALLBACK(int) drvCharReceiveLoop(RTTHREAD hThreadSelf, void *pvUser)
     210{
     211    RT_NOREF(hThreadSelf);
    202212    PDRVCHAR    pThis = (PDRVCHAR)pvUser;
    203213    char        abBuffer[256];
     
    254264}
    255265
    256 /**
    257  * Set the modem lines.
    258  *
    259  * @returns VBox status code
    260  * @param pInterface        Pointer to the interface structure.
    261  * @param RequestToSend     Set to true if this control line should be made active.
    262  * @param DataTerminalReady Set to true if this control line should be made active.
    263  */
    264 static DECLCALLBACK(int) drvCharSetModemLines(PPDMICHARCONNECTOR pInterface, bool RequestToSend, bool DataTerminalReady)
     266
     267/**
     268 * @callback_method_impl{PDMICHARCONNECTOR,pfnSetModemLines}
     269 */
     270static DECLCALLBACK(int) drvCharSetModemLines(PPDMICHARCONNECTOR pInterface, bool fRequestToSend, bool fDataTerminalReady)
    265271{
    266272    /* Nothing to do here. */
    267     return VINF_SUCCESS;
    268 }
    269 
    270 /**
    271  * Sets the TD line into break condition.
    272  *
    273  * @returns VBox status code.
    274  * @param   pInterface  Pointer to the interface structure containing the called function pointer.
    275  * @param   fBreak      Set to true to let the device send a break false to put into normal operation.
    276  * @thread  Any thread.
     273    RT_NOREF(pInterface, fRequestToSend, fDataTerminalReady);
     274    return VINF_SUCCESS;
     275}
     276
     277
     278/**
     279 * @callback_method_impl{PDMICHARCONNECTOR,pfnSetBreak}
    277280 */
    278281static DECLCALLBACK(int) drvCharSetBreak(PPDMICHARCONNECTOR pInterface, bool fBreak)
    279282{
    280283    /* Nothing to do here. */
    281     return VINF_SUCCESS;
    282 }
     284    RT_NOREF(pInterface, fBreak);
     285    return VINF_SUCCESS;
     286}
     287
    283288
    284289/* -=-=-=-=- driver interface -=-=-=-=- */
     
    345350static DECLCALLBACK(int) drvCharConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    346351{
     352    RT_NOREF(pCfg);
     353    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    347354    PDRVCHAR pThis = PDMINS_2_DATA(pDrvIns, PDRVCHAR);
    348355    LogFlow(("%s: iInstance=%d\n", __FUNCTION__, pDrvIns->iInstance));
    349     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    350356
    351357    /*
  • trunk/src/VBox/Devices/Serial/DrvNamedPipe.cpp

    r62679 r62908  
    297297 *
    298298 * @returns 0 on success.
    299  * @param   ThreadSelf Thread handle to this thread.
     299 * @param   hThreadSelf Thread handle to this thread.
    300300 * @param   pvUser      User argument.
    301301 */
    302 static DECLCALLBACK(int) drvNamedPipeListenLoop(RTTHREAD ThreadSelf, void *pvUser)
    303 {
     302static DECLCALLBACK(int) drvNamedPipeListenLoop(RTTHREAD hThreadSelf, void *pvUser)
     303{
     304    RT_NOREF(hThreadSelf);
    304305    PDRVNAMEDPIPE   pThis = (PDRVNAMEDPIPE)pvUser;
    305306    int             rc = VINF_SUCCESS;
     
    523524static DECLCALLBACK(int) drvNamedPipeConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    524525{
     526    RT_NOREF(fFlags);
     527    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    525528    PDRVNAMEDPIPE pThis = PDMINS_2_DATA(pDrvIns, PDRVNAMEDPIPE);
    526     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    527529
    528530    /*
  • trunk/src/VBox/Devices/Serial/DrvRawFile.cpp

    r62507 r62908  
    155155static DECLCALLBACK(int) drvRawFileConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    156156{
     157    RT_NOREF(fFlags);
     158    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    157159    PDRVRAWFILE pThis = PDMINS_2_DATA(pDrvIns, PDRVRAWFILE);
    158     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    159160
    160161    /*
  • trunk/src/VBox/Devices/Serial/DrvTCP.cpp

    r62761 r62908  
    197197 * Receive thread loop.
    198198 *
    199  * @returns 0 on success.
    200  * @param   ThreadSelf Thread handle to this thread.
     199 * @returns VINF_SUCCESS
     200 * @param   hThreadSelf Thread handle to this thread.
    201201 * @param   pvUser      User argument.
    202202 */
    203 static DECLCALLBACK(int) drvTCPListenLoop(RTTHREAD ThreadSelf, void *pvUser)
    204 {
     203static DECLCALLBACK(int) drvTCPListenLoop(RTTHREAD hThreadSelf, void *pvUser)
     204{
     205    RT_NOREF(hThreadSelf);
    205206    PDRVTCP pThis = (PDRVTCP)pvUser;
    206     int     rc = VINF_SUCCESS;
     207    int     rc;
    207208
    208209    while (RT_LIKELY(!pThis->fShutdown))
     
    347348static DECLCALLBACK(int) drvTCPConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    348349{
     350    RT_NOREF(fFlags);
     351    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    349352    PDRVTCP pThis = PDMINS_2_DATA(pDrvIns, PDRVTCP);
    350     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    351353
    352354#ifdef RT_OS_WINDOWS
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