Our website uses cookies to enhance your browsing experience.
Accept
to the top
close form

Fill out the form in 2 simple steps below:

Your contact information:

Step 1
Congratulations! This is your promo code!

Desired license type:

Step 2
Team license
Enterprise license
** By clicking this button you agree to our Privacy Policy statement
close form
Request our prices
New License
License Renewal
--Select currency--
USD
EUR
* By clicking this button you agree to our Privacy Policy statement

close form
Free PVS‑Studio license for Microsoft MVP specialists
* By clicking this button you agree to our Privacy Policy statement

close form
To get the licence for your open-source project, please fill out this form
* By clicking this button you agree to our Privacy Policy statement

close form
I am interested to try it on the platforms:
* By clicking this button you agree to our Privacy Policy statement

close form
check circle
Message submitted.

Your message has been sent. We will email you at


If you do not see the email in your inbox, please check if it is filtered to one of the following folders:

  • Promotion
  • Updates
  • Spam

Webinar: Parsing C++ - 10.10

>
>
>
Examples of errors detected by the V648…

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.