From f6f4f276360cb645e01c447f244949305972fb25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 29 Nov 2015 22:03:42 +0100 Subject: [PATCH] CheckOther::checkInvalidTestForOverflow: minor fix, only warn when warnings are enabled. --- lib/checkother.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 6c58130a0..672d07d0d 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -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) {