Examples of errors detected by the V648 diagnostic
V648. Priority of '&&' operation is higher than priority of '||' operation.
Wolfenstein 3D
V648 Priority of the '&&' operation is higher than that of the '||' operation. math_quaternion.h 167
inline int operator!=( quat_t a, quat_t b )
{
return ( ( a.x != b.x ) || ( a.y != b.y ) ||
( a.z != b.z ) && ( a.w != b.w ) );
}
Most likely this is what should be written here: ( a.z != b.z ) || ( a.w != b.w ).
Oracle VM Virtual Box
V648 Priority of the '&&' operation is higher than that of the '||' operation. drvacpi.cpp 132
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;
}
....
}
Command & Conquer
V648 Priority of the '&&' operation is higher than that of the '||' operation. INFANTRY.CPP 1003
void InfantryClass::Assign_Target(TARGET target)
{
....
if (building && building->Class->IsCaptureable &&
(GameToPlay != GAME_NORMAL || *building != STRUCT_EYE && Scenario < 13)) {
Assign_Destination(target);
}
....
}
Similar errors can be found in some other places:
- V648 Priority of the '&&' operation is higher than that of the '||' operation. TEAM.CPP 456
- V648 Priority of the '&&' operation is higher than that of the '||' operation. DISPLAY.CPP 1160
- V648 Priority of the '&&' operation is higher than that of the '||' operation. DISPLAY.CPP 1571
- And 2 additional diagnostic messages.