Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static DECLCALLBACK(int) drvACPIQueryPowerSource(....)
- {
- ....
- /* running on battery? */
- if (powerStatus.ACLineStatus == 0 /* Offline */
- || powerStatus.ACLineStatus == 255 /* Unknown */
- && (powerStatus.BatteryFlag & 15))
- {
- *pPowerSource = PDM_ACPI_POWER_SOURCE_BATTERY;
- }
- ....
- }
- This suspicious code was found in VirtualBox project by PVS-Studio static code analyzer.
- Warning message is:
- V648 Priority of the '&&' operation is higher than that of the '||' operation. drvacpi.cpp 132
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement