CheckOther::checkInvalidTestForOverflow: minor fix, only warn when warnings are enabled.

This commit is contained in:
Daniel Marjamäki 2015-11-29 22:03:42 +01:00
parent 26a07265a8
commit f6f4f27636
1 changed files with 3 additions and 0 deletions

View File

@ -2458,6 +2458,9 @@ void CheckOther::unusedLabelError(const Token* tok)
void CheckOther::checkInvalidTestForOverflow()
{
if (!_settings->isEnabled("warning"))
return;
const SymbolDatabase *symbolDatabase = _tokenizer->getSymbolDatabase();
const std::size_t functions = symbolDatabase->functionScopes.size();
for (std::size_t i = 0; i < functions; ++i) {