-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Index Maintenance
-
Labels:
-
Fully Compatible
-
ALL
-
Query 2017-06-19
Unable to find source-code formatter for language: с++. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
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.
- is duplicated by
-
SERVER-28570 Analysis of 'MongoDB' source code by PVS-Studio
- Closed