From fa94312c9a31e4d078464e6e96089b44d86aaeb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 3 Oct 2010 16:59:13 +0200 Subject: [PATCH] temporarily disable the 'object destroyed immediately' message --- lib/checkother.cpp | 4 ++++ test/testother.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 007a6f136..6cf27b554 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -3865,6 +3865,10 @@ void CheckOther::checkMisusedScopedObject() unsigned int depth = 0; std::string className = ""; + // This condition can be removed after the release. it is here because of #2072 + if (!_settings->inconclusive) + return; + for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next()) { withinFunction |= Token::Match(tok, ") const| {"); diff --git a/test/testother.cpp b/test/testother.cpp index e92fed815..6a82d9a12 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -126,6 +126,7 @@ private: // Check.. Settings settings; settings._checkCodingStyle = true; + settings.inconclusive = true; CheckOther checkOther(&tokenizer, &settings, this); // Clear the error buffer.. @@ -3039,6 +3040,7 @@ private: tokenizer.simplifyTokenList(); Settings settings; + settings.inconclusive = true; CheckOther checkOther(&tokenizer, &settings, this); checkOther.checkMisusedScopedObject();