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

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;

According to Common Weakness Enumeration, potential errors found by using this diagnostic are classified as CWE-483.

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


Bugs Found

Checked Projects
410
Collected Errors
14 111
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