Fixed #4298 (Strange 'missing include' output message when executing '-jn --check-config').

This commit is contained in:
Edoardo Prezioso 2012-10-19 19:26:42 +02:00
parent eb84c03b01
commit d459b6acb1
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -66,7 +66,7 @@ private:
/** @brief Key is file name, and value is the content of the file */
std::map<std::string, std::string> _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.