- Timestamp:
- Aug 3, 2016 11:33:27 AM (8 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DrvACPI.cpp
r62679 r62908 127 127 { 128 128 #if defined(RT_OS_WINDOWS) 129 RT_NOREF(pInterface); 129 130 SYSTEM_POWER_STATUS powerStatus; 130 131 if (GetSystemPowerStatus(&powerStatus)) … … 163 164 164 165 #elif defined (RT_OS_DARWIN) 166 RT_NOREF(pInterface); 165 167 *pPowerSource = PDM_ACPI_POWER_SOURCE_UNKNOWN; 166 168 … … 204 206 205 207 #elif defined(RT_OS_FREEBSD) 208 RT_NOREF(pInterface); 206 209 int fAcLine = 0; 207 210 size_t cbParameter = sizeof(fAcLine); … … 224 227 } 225 228 #else /* !RT_OS_FREEBSD either - what could this be? */ 229 RT_NOREF(pInterface); 226 230 *pPowerSource = PDM_ACPI_POWER_SOURCE_OUTLET; 227 231 … … 239 243 { 240 244 /* default return values for all architectures */ 241 *pfPresent = false; /* no battery present */245 *pfPresent = false; /* no battery present */ 242 246 *penmBatteryState = PDM_ACPI_BAT_STATE_CHARGED; 243 247 *penmRemainingCapacity = PDM_ACPI_BAT_CAPACITY_UNKNOWN; 244 *pu32PresentRate = ~0;/* present rate is unknown */248 *pu32PresentRate = UINT32_MAX; /* present rate is unknown */ 245 249 246 250 #if defined(RT_OS_WINDOWS) 251 RT_NOREF(pInterface); 247 252 SYSTEM_POWER_STATUS powerStatus; 248 253 if (GetSystemPowerStatus(&powerStatus)) … … 280 285 281 286 #elif defined(RT_OS_DARWIN) 287 RT_NOREF(pInterface); 282 288 CFTypeRef pBlob = IOPSCopyPowerSourcesInfo(); 283 289 CFArrayRef pSources = IOPSCopyPowerSourcesList(pBlob); … … 384 390 385 391 #elif defined(RT_OS_FREEBSD) 392 RT_NOREF(pInterface); 386 393 /* We try to use /dev/acpi first and if that fails use the sysctls. */ 387 394 bool fSuccess = true; … … 947 954 static DECLCALLBACK(void) drvACPIDestruct(PPDMDRVINS pDrvIns) 948 955 { 949 PDRVACPI pThis = PDMINS_2_DATA(pDrvIns, PDRVACPI);950 951 956 LogFlow(("drvACPIDestruct\n")); 952 957 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); 953 958 954 959 #ifdef RT_OS_LINUX 960 PDRVACPI pThis = PDMINS_2_DATA(pDrvIns, PDRVACPI); 955 961 if (pThis->hPollerSleepEvent != NIL_RTSEMEVENT) 956 962 { … … 969 975 static DECLCALLBACK(int) drvACPIConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 970 976 { 977 RT_NOREF(fFlags); 978 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns); 971 979 PDRVACPI pThis = PDMINS_2_DATA(pDrvIns, PDRVACPI); 972 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);973 980 int rc = VINF_SUCCESS; 974 981 -
trunk/src/VBox/Devices/PC/DrvAcpiCpu.cpp
r62509 r62908 48 48 static DECLCALLBACK(int) drvACPICpuConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 49 49 { 50 RT_NOREF(fFlags); 50 51 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns); 51 52 -
trunk/src/VBox/Devices/Serial/DrvChar.cpp
r62507 r62908 103 103 /* -=-=-=-=- ICharConnector -=-=-=-=- */ 104 104 105 /** @copydoc PDMICHARCONNECTOR::pfnWrite */ 105 /** 106 * @interface_method_impl{PDMICHARCONNECTOR,pfnWrite} 107 */ 106 108 static DECLCALLBACK(int) drvCharWrite(PPDMICHARCONNECTOR pInterface, const void *pvBuf, size_t cbWrite) 107 109 { … … 123 125 } 124 126 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 */ 131 static DECLCALLBACK(int) drvCharSetParameters(PPDMICHARCONNECTOR pInterface, unsigned Bps, char chParity, 132 unsigned cDataBits, unsigned cStopBits) 133 { 134 RT_NOREF(pInterface, Bps, chParity, cDataBits, cStopBits); 128 135 /*PDRVCHAR pThis = PDMICHAR_2_DRVCHAR(pInterface); - unused*/ 129 136 … … 139 146 * 140 147 * @returns 0 on success. 141 * @param ThreadSelfThread handle to this thread.148 * @param hThreadSelf Thread handle to this thread. 142 149 * @param pvUser User argument. 143 150 */ 144 static DECLCALLBACK(int) drvCharSendLoop(RTTHREAD ThreadSelf, void *pvUser) 145 { 151 static DECLCALLBACK(int) drvCharSendLoop(RTTHREAD hThreadSelf, void *pvUser) 152 { 153 RT_NOREF(hThreadSelf); 146 154 PDRVCHAR pThis = (PDRVCHAR)pvUser; 147 155 … … 189 197 } 190 198 199 191 200 /* -=-=-=-=- receive thread -=-=-=-=- */ 192 201 … … 195 204 * 196 205 * @returns 0 on success. 197 * @param ThreadSelfThread handle to this thread.206 * @param hThreadSelf Thread handle to this thread. 198 207 * @param pvUser User argument. 199 208 */ 200 static DECLCALLBACK(int) drvCharReceiveLoop(RTTHREAD ThreadSelf, void *pvUser) 201 { 209 static DECLCALLBACK(int) drvCharReceiveLoop(RTTHREAD hThreadSelf, void *pvUser) 210 { 211 RT_NOREF(hThreadSelf); 202 212 PDRVCHAR pThis = (PDRVCHAR)pvUser; 203 213 char abBuffer[256]; … … 254 264 } 255 265 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 */ 270 static DECLCALLBACK(int) drvCharSetModemLines(PPDMICHARCONNECTOR pInterface, bool fRequestToSend, bool fDataTerminalReady) 265 271 { 266 272 /* 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} 277 280 */ 278 281 static DECLCALLBACK(int) drvCharSetBreak(PPDMICHARCONNECTOR pInterface, bool fBreak) 279 282 { 280 283 /* Nothing to do here. */ 281 return VINF_SUCCESS; 282 } 284 RT_NOREF(pInterface, fBreak); 285 return VINF_SUCCESS; 286 } 287 283 288 284 289 /* -=-=-=-=- driver interface -=-=-=-=- */ … … 345 350 static DECLCALLBACK(int) drvCharConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 346 351 { 352 RT_NOREF(pCfg); 353 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns); 347 354 PDRVCHAR pThis = PDMINS_2_DATA(pDrvIns, PDRVCHAR); 348 355 LogFlow(("%s: iInstance=%d\n", __FUNCTION__, pDrvIns->iInstance)); 349 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);350 356 351 357 /* -
trunk/src/VBox/Devices/Serial/DrvNamedPipe.cpp
r62679 r62908 297 297 * 298 298 * @returns 0 on success. 299 * @param ThreadSelfThread handle to this thread.299 * @param hThreadSelf Thread handle to this thread. 300 300 * @param pvUser User argument. 301 301 */ 302 static DECLCALLBACK(int) drvNamedPipeListenLoop(RTTHREAD ThreadSelf, void *pvUser) 303 { 302 static DECLCALLBACK(int) drvNamedPipeListenLoop(RTTHREAD hThreadSelf, void *pvUser) 303 { 304 RT_NOREF(hThreadSelf); 304 305 PDRVNAMEDPIPE pThis = (PDRVNAMEDPIPE)pvUser; 305 306 int rc = VINF_SUCCESS; … … 523 524 static DECLCALLBACK(int) drvNamedPipeConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 524 525 { 526 RT_NOREF(fFlags); 527 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns); 525 528 PDRVNAMEDPIPE pThis = PDMINS_2_DATA(pDrvIns, PDRVNAMEDPIPE); 526 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);527 529 528 530 /* -
trunk/src/VBox/Devices/Serial/DrvRawFile.cpp
r62507 r62908 155 155 static DECLCALLBACK(int) drvRawFileConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 156 156 { 157 RT_NOREF(fFlags); 158 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns); 157 159 PDRVRAWFILE pThis = PDMINS_2_DATA(pDrvIns, PDRVRAWFILE); 158 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);159 160 160 161 /* -
trunk/src/VBox/Devices/Serial/DrvTCP.cpp
r62761 r62908 197 197 * Receive thread loop. 198 198 * 199 * @returns 0 on success.200 * @param ThreadSelfThread handle to this thread.199 * @returns VINF_SUCCESS 200 * @param hThreadSelf Thread handle to this thread. 201 201 * @param pvUser User argument. 202 202 */ 203 static DECLCALLBACK(int) drvTCPListenLoop(RTTHREAD ThreadSelf, void *pvUser) 204 { 203 static DECLCALLBACK(int) drvTCPListenLoop(RTTHREAD hThreadSelf, void *pvUser) 204 { 205 RT_NOREF(hThreadSelf); 205 206 PDRVTCP pThis = (PDRVTCP)pvUser; 206 int rc = VINF_SUCCESS;207 int rc; 207 208 208 209 while (RT_LIKELY(!pThis->fShutdown)) … … 347 348 static DECLCALLBACK(int) drvTCPConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 348 349 { 350 RT_NOREF(fFlags); 351 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns); 349 352 PDRVTCP pThis = PDMINS_2_DATA(pDrvIns, PDRVTCP); 350 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);351 353 352 354 #ifdef RT_OS_WINDOWS
Note:
See TracChangeset
for help on using the changeset viewer.