V6063. Odd semicolon ';' after 'if/foreach' operator.


The analyzer has detected a potential defect that has to do with a semicolon ';' after an if or foreach statement.

Consider the following example:

int someMethod(int value, int a, int b, int c, ...)
{
  int res = -1;
  ....
  if (value > (a - b)/c);
  {
    ....
    res = calculate(value);
  }
  ....
  return res;
}

Fixed code:

int someMethod(int value, int a, int b, int c, ...)
{
  int res = -1;
  ....
  if (value > (a - b)/c)
  {
    ....
    res = calculate(value);
  }
  ....
  return res;
}

Bugs Found

Checked Projects
343
Collected Errors
12 850