string IndexBoundsBuilder::simpleRegex(....) {
|
....
|
if (c == 'Q') {
|
....
|
} else if ((c >= 'A' && c <= 'Z') ||
|
(c >= 'a' && c <= 'z') ||
|
(c >= '0' && c <= '0') || // <=
|
(c == '\0')) {
|
....
|
}
|
....
|
}
|
A link to the source code on GitHub
PVS-Studio warning: V590 Consider inspecting the 'c >= '0' && c <= '0'' expression. The expression is excessive or contains a misprint. index_bounds_builder.cpp 145
Most likely, the subexpression c >= '0' && c <= '0' has an error, there is no range check of the symbol (this subexpression will be true only in case c == '0'). Judging by other subexpressions, supposedly it should be as follows: c >= '0' && c <= '9'.
This issue was originally reported in SERVER-28570.
|