diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index e27c6387b..776f8d319 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -2101,6 +2101,8 @@ void CheckClass::selfInitializationError(const Token* tok, const std::string& va void CheckClass::checkPureVirtualFunctionCall() { + if (! _settings->isEnabled("warning")) + return; const std::size_t functions = symbolDatabase->functionScopes.size(); std::map > callsPureVirtualFunctionMap; for (std::size_t i = 0; i < functions; ++i) { diff --git a/test/testclass.cpp b/test/testclass.cpp index 40d655da9..0f6d7896c 100644 --- a/test/testclass.cpp +++ b/test/testclass.cpp @@ -6045,7 +6045,7 @@ private: if (s) settings = *s; else - settings.addEnabled("style"); + settings.addEnabled("warning"); settings.inconclusive = inconclusive; // Tokenize..