From eeee630f774246ec025a6db8877f988c88c2e950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 29 Oct 2016 12:35:14 +0200 Subject: [PATCH] fix cppcheck warnings --- .travis_suppressions | 1 + lib/errorlogger.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis_suppressions b/.travis_suppressions index e1d2f35dd..04e66ce8e 100644 --- a/.travis_suppressions +++ b/.travis_suppressions @@ -7,6 +7,7 @@ passedByValue:lib/symboldatabase.h passedByValue:lib/library.h knownConditionTrueFalse:lib/platform.cpp knownConditionTrueFalse:build/* +useInitializationList:lib/errorlogger.cpp *:gui/test* *:test/test.cxx *:test/cfg* diff --git a/lib/errorlogger.h b/lib/errorlogger.h index f82178a9b..086ed06ca 100644 --- a/lib/errorlogger.h +++ b/lib/errorlogger.h @@ -216,7 +216,7 @@ public: ErrorMessage(const std::list& callstack, const TokenList* list, Severity::SeverityType severity, const std::string& id, const std::string& msg, bool inconclusive); ErrorMessage(const std::list& callstack, const TokenList* list, Severity::SeverityType severity, const std::string& id, const std::string& msg, const CWE &cwe, bool inconclusive); ErrorMessage(); - ErrorMessage(const tinyxml2::XMLElement * const errmsg); + explicit ErrorMessage(const tinyxml2::XMLElement * const errmsg); /** * Format the error message in XML format