V605. Consider verifying the expression. An unsigned value is compared to the number - NN.

The analyzer has detected a potential error in an expression where an unsigned variable is compared to a negative number. This is a rather rare situation and such a comparison is not always an error. However, getting the V605 warning is a good reason to review the code.

This is an example of code the V605 warning will be generated for:

unsigned u = ...;
if (u < -1)
{ ... }

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

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

Bugs Found

Checked Projects
Collected Errors
12 668