diff --git a/cli/threadexecutor.cpp b/cli/threadexecutor.cpp index 55df0b4c8..ba6466c79 100644 --- a/cli/threadexecutor.cpp +++ b/cli/threadexecutor.cpp @@ -69,7 +69,7 @@ int ThreadExecutor::handleRead(int rpipe, unsigned int &result) return -1; } - if (type != REPORT_OUT && type != REPORT_ERROR && type != CHILD_END) { + if (type != REPORT_OUT && type != REPORT_ERROR && type != REPORT_INFO && type != CHILD_END) { std::cerr << "#### You found a bug from cppcheck.\nThreadExecutor::handleRead error, type was:" << type << std::endl; exit(0); } @@ -88,7 +88,7 @@ int ThreadExecutor::handleRead(int rpipe, unsigned int &result) if (type == REPORT_OUT) { _errorLogger.reportOut(buf); - } else if (type == REPORT_ERROR) { + } else if (type == REPORT_ERROR || type == REPORT_INFO) { ErrorLogger::ErrorMessage msg; msg.deserialize(buf); @@ -292,7 +292,7 @@ void ThreadExecutor::reportErr(const ErrorLogger::ErrorMessage &msg) void ThreadExecutor::reportInfo(const ErrorLogger::ErrorMessage &msg) { - writeToPipe(REPORT_OUT, msg.serialize()); + writeToPipe(REPORT_INFO, msg.serialize()); } #else diff --git a/cli/threadexecutor.h b/cli/threadexecutor.h index 7d57ed4ca..6c7ff96ad 100644 --- a/cli/threadexecutor.h +++ b/cli/threadexecutor.h @@ -66,7 +66,7 @@ private: /** @brief Key is file name, and value is the content of the file */ std::map _fileContents; private: - enum PipeSignal {REPORT_OUT='1',REPORT_ERROR='2', CHILD_END='3'}; + enum PipeSignal {REPORT_OUT='1',REPORT_ERROR='2', REPORT_INFO='3', CHILD_END='4'}; /** * Read from the pipe, parse and handle what ever is in there.