CheckBufferOverrun: only report warnings when --enable=warning has been used
This commit is contained in:
parent
228f5960fc
commit
6c3b7c1d0e
|
@ -85,6 +85,8 @@ void CheckBufferOverrun::arrayIndexOutOfBoundsError(const Token *tok, const Arra
|
||||||
}
|
}
|
||||||
|
|
||||||
if (condition != nullptr) {
|
if (condition != nullptr) {
|
||||||
|
if (!_settings->isEnabled("warning"))
|
||||||
|
return;
|
||||||
errmsg << " Otherwise condition '" << condition->expressionString() << "' is redundant.";
|
errmsg << " Otherwise condition '" << condition->expressionString() << "' is redundant.";
|
||||||
std::list<const Token *> callstack;
|
std::list<const Token *> callstack;
|
||||||
callstack.push_back(tok);
|
callstack.push_back(tok);
|
||||||
|
|
Loading…
Reference in New Issue