don't print warning message if --enable=warning is not given.

message was of type:
(warning) Call of pure virtual function 'foo' in constructor.
This commit is contained in:
Matthias Krüger 2015-04-06 13:34:44 +02:00
parent 6ff9a52d8b
commit 592177200a
2 changed files with 3 additions and 1 deletions

View File

@ -2101,6 +2101,8 @@ void CheckClass::selfInitializationError(const Token* tok, const std::string& va
void CheckClass::checkPureVirtualFunctionCall() void CheckClass::checkPureVirtualFunctionCall()
{ {
if (! _settings->isEnabled("warning"))
return;
const std::size_t functions = symbolDatabase->functionScopes.size(); const std::size_t functions = symbolDatabase->functionScopes.size();
std::map<const Function *, std::list<const Token *> > callsPureVirtualFunctionMap; std::map<const Function *, std::list<const Token *> > callsPureVirtualFunctionMap;
for (std::size_t i = 0; i < functions; ++i) { for (std::size_t i = 0; i < functions; ++i) {

View File

@ -6045,7 +6045,7 @@ private:
if (s) if (s)
settings = *s; settings = *s;
else else
settings.addEnabled("style"); settings.addEnabled("warning");
settings.inconclusive = inconclusive; settings.inconclusive = inconclusive;
// Tokenize.. // Tokenize..