# V605. Unsigned value is compared to the NN number. Consider inspecting the expression.

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)
    { ... }

This diagnostic is classified as:

CWE-682 CERT-INT02-C

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