diff --git a/.pvsconfig b/.pvsconfig index 4d7413f0b4..ae3091a1fd 100644 --- a/.pvsconfig +++ b/.pvsconfig @@ -14,8 +14,6 @@ //-V::539 # Expression is always true/false. //-V::547 -# Expression of the 'A - B > 0' kind will work as 'A != B'. -//-V::555 # Possible array overrun. //-V::557 # Part of conditional expression is always true/false. diff --git a/Source/cmStringReplaceHelper.cxx b/Source/cmStringReplaceHelper.cxx index 0e1845776e..8ccc094b8d 100644 --- a/Source/cmStringReplaceHelper.cxx +++ b/Source/cmStringReplaceHelper.cxx @@ -93,7 +93,7 @@ void cmStringReplaceHelper::ParseReplaceExpression() this->Replacements.emplace_back( this->ReplaceExpression.substr(l, r - l)); } else { - if (r - l > 0) { + if (r != l) { this->Replacements.emplace_back( this->ReplaceExpression.substr(l, r - l)); }