From d459b6acb1171026d5186bf12003c9750b88a97c Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Fri, 19 Oct 2012 19:26:42 +0200 Subject: [PATCH] Fixed #4298 (Strange 'missing include' output message when executing '-jn --check-config'). --- cli/threadexecutor.cpp | 6 +++--- cli/threadexecutor.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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.