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: Evaluation - 05.12

>
>
>
Examples of errors detected by the V686…

Examples of errors detected by the V686 diagnostic

V686. Pattern A || (A && ...) was detected. The expression is excessive or contains a logical error.


Blender

V686 A pattern was detected: (rootsel) || ((rootsel) && ...). The expression is excessive or contains a logical error. ed_transverts.c 325


void ED_transverts_create_from_obedit(....)
{
  ....
  if ((tipsel && rootsel) || (rootsel)) {....}
  ....
}

Similar errors can be found in some other places:

  • V686 A pattern was detected: (!py_b_len) || ((!py_b_len) && ...). The expression is excessive or contains a logical error. aud_pyapi.cpp 864
  • V686 A pattern was detected: (xn == 0.0f) || ((xn == 0.0f) && ...). The expression is excessive or contains a logical error. renderdatabase.c 993
  • V686 A pattern was detected: (xn == 0.0f) || ((xn == 0.0f) && ...). The expression is excessive or contains a logical error. renderdatabase.c 1115

Tor

V686 A pattern was detected: (tm.tm_mday < cfg_start_day) || ((tm.tm_mday < cfg_start_day) && ...). The expression is excessive or contains a logical error. hibernate.c 333


static time_t
edge_of_accounting_period_containing(time_t now, int get_end)
{
  ....
  case UNIT_MONTH: {
    if (tm.tm_mday < cfg_start_day ||
        (tm.tm_mday < cfg_start_day && before)) {
      --tm.tm_mon;
    }
  ....
}

EFL Core Libraries

V686 A pattern was detected: (nextc == '*') || ((nextc == '*') && ...). The expression is excessive or contains a logical error. cpplib.c 1022


static void
copy_rest_of_line(cpp_reader * pfile)
{
  ....
  if (nextc == '*' || (opts->cplusplus_comments && nextc == '*'))
    goto scan_directive_token;
  ....
}

EFL Core Libraries

V686 A pattern was detected: (!im->file) || ((!im->file) && ...). The expression is excessive or contains a logical error. evas_cache2.c 825


static Image_Entry *
_scaled_image_find(Image_Entry *im, ....)
{
   size_t               pathlen, keylen, size;
   char                 *hkey;
   Evas_Image_Load_Opts  lo;
   Image_Entry          *ret;

   if (((!im->file) || ((!im->file) && (!im->key))) ||
       (!im->data1) ||
       ((src_w == dst_w) && (src_h == dst_h)) ||
       ((!im->flags.alpha) && (!smooth))) return NULL;
  ....
}

Similar errors can be found in some other places:

  • V686 A pattern was detected: (!im->file) || ((!im->file) && ...). The expression is excessive or contains a logical error. evas_cache2.c 905

Tizen

V686 A pattern was detected: (sound == 0) || ((sound == 0) && ...). The expression is excessive or contains a logical error. control.c 355


Eina_Bool volume_control_show_view(...., int sound, ....)
{
  ....
  if(((vibration == 1 && sound == 0) || sound == 0) &&
     sound_type == SOUND_TYPE_RINGTONE) {
    volume = 0;
  }
  ....
}