diff --git a/cli/cppcheckexecutor.cpp b/cli/cppcheckexecutor.cpp index 7e5a21708..b9715792f 100644 --- a/cli/cppcheckexecutor.cpp +++ b/cli/cppcheckexecutor.cpp @@ -267,7 +267,7 @@ void CppCheckExecutor::reportProgress(const std::string &filename, const char st void CppCheckExecutor::reportInfo(const ErrorLogger::ErrorMessage &msg) { - reportOut(msg.toXML(false, _settings._xml_version)); + reportOut(msg.toXML(false, _settings->_xml_version)); } void CppCheckExecutor::reportStatus(size_t fileindex, size_t filecount, size_t sizedone, size_t sizetotal) diff --git a/lib/errorlogger.h b/lib/errorlogger.h index 34fbf3978..8cf5ae542 100644 --- a/lib/errorlogger.h +++ b/lib/errorlogger.h @@ -286,7 +286,9 @@ public: * Output information messages. * @param msg Location and other information about the found error. */ - virtual void reportInfo(const ErrorLogger::ErrorMessage &msg) = 0; + virtual void reportInfo(const ErrorLogger::ErrorMessage &msg) { + reportErr(msg); + } /** * Report list of unmatched suppressions diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index a526b08f1..f1bb0227f 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -2100,7 +2100,7 @@ void Preprocessor::missingInclude(const std::string &filename, unsigned int line const std::string id = userheader ? "missingInclude" : "debug"; ErrorLogger::ErrorMessage errmsg(locationList, severity, "Include file: \"" + header + "\" not found.", id, false); errmsg.file0 = file0; - errorLogger->reportInfo(errmsg); + _errorLogger->reportInfo(errmsg); } /**