>
>
>
V626. It's possible that ',' should be …


V626. It's possible that ',' should be replaced by ';'. Consider checking for typos.

The analyzer has detected a potential error: comma ',' is written by accident instead of semicolon ';'. This misprint can lead to an incorrect logic of program execution.

Consider an example:

int a;
int b;
...
if (a == 2)
  a++,
b = a;

This code will result in executing the "b = a;" expression only when the 'if' operator's condition holds. This is most likely a misprint and ',' should be replaced with ';'. This is the correct code:

if (a == 2)
  a++;
b = a;

The analyzer won't generate the message if formatting of a code fragment demonstrates deliberate use of the ',' operator. Here is a code sample:

if (a == 2)
  a++,
  b = a;

if (a == 2)
  a++, b = a;

This diagnostic is classified as:

You can look at examples of errors detected by the V626 diagnostic.