To get a trial key
fill out the form below
Team License (a basic version)
Enterprise License (extended version)
* By clicking this button you agree to our Privacy Policy statement

Request our prices
New License
License Renewal
--Select currency--
USD
EUR
GBP
RUB
* By clicking this button you agree to our Privacy Policy statement

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

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

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

Message submitted.

Your message has been sent. We will email you at


If you haven't received our response, please do the following:
check your Spam/Junk folder and click the "Not Spam" button for our message.
This way, you won't miss messages from our team in the future.

>
>
>
Examples of errors detected by the V634…

Examples of errors detected by the V634 diagnostic

V634. Priority of '+' operation is higher than priority of '<<' operation. Consider using parentheses in the expression.


Haiku Operation System

V634 The priority of the '*' operation is higher than that of the '<<' operation. It's possible that parentheses should be used in the expression. RAW.cpp 1141


void
DCRaw::_WaveletDenoise()
{
  ....
  for (i = 0; i < (1 << dim * 2); i++) {  // <=
    if (fimg[i] < -fThreshold)
      fimg[i] += fThreshold;
    else if (fimg[i] > fThreshold)
      fimg[i] -= fThreshold;
    else
      fimg[i] = 0;
  }
  ....
}

Similar errors can be found in some other places:

  • V634 The priority of the '*' operation is higher than that of the '<<' operation. It's possible that parentheses should be used in the expression. RAW.cpp 1099

CryEngine V

V634 The priority of the '*' operation is higher than that of the '<<' operation. It's possible that parentheses should be used in the expression. model.cpp 336


enum joint_flags
{
  angle0_locked = 1,
  ....
};

bool CDefaultSkeleton::SetupPhysicalProxies(....)
{
  ....
  for (int j = 0; .... ; j++)
  {
    // lock axes with 0 limits range
    m_arrModelJoints[i]....flags |= (....) * angle0_locked << j;
  }
  ....
}

System Shock

V634 The priority of the '-' operation is higher than that of the '<<' operation. It's possible that parentheses should be used in the expression. FRCLIP.C 256


#define span_right(y,s) \
  (x_span_lists[((y)<<SPAN_SHIFT)+(s<<1)+SPAN_RIGHT])

void fr_span_parse(void)
  {
  ....
  if (....span_right(y,(*cur_span_cnt)-1)....)>frpipe_dist)
    ....
  ....
}

Stellarium

V634 The priority of the '*' operation is higher than that of the '<<' operation. It's possible that parentheses should be used in the expression. StelHips.cpp 271


HipsTile* HipsSurvey::getTile(int order, int pix)
{
  ....
  if (order == orderMin && !allsky.isNull())
  {
    int nbw = sqrt(12 * 1 << (2 * order));
    ....
  }
  ....
}

What the programmer must have really meant is this: int nbw = sqrt(12 * (1 << 2 * order));


Qemu

V634 The priority of the '*' operation is higher than that of the '<<' operation. It's possible that parentheses should be used in the expression. nand.c 310


static void nand_command(NANDFlashState *s)
{
  ....
  s->addr &= (1ull << s->addrlen * 8) - 1;
  ....
}

Snort

V634 The priority of the '*' operation is higher than that of the '<<' operation. It's possible that parentheses should be used in the expression. bug34427.c 160


int process_val(const u_int8_t *data, u_int32_t data_len,
  u_int32_t *retvalue, ....) {
  *retvalue = 0;
  ....
/* Now find the actual value */
  for (; i < data_len; i++) {
    *retvalue += data[i] * PM_EXP2(8 * (data_len - i - 1));
  }

  return(0);
}

#define PM_EXP2(A) 1 << A

This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site.
Learn More →
Accept