BUG: Looks like gcov produces lines with string /*EOF*/ on them if there is no line at the end of the file. This will fix the coverage code complaining about it

This commit is contained in:
Andy Cedilnik 2006-10-24 12:44:59 -04:00
parent 212eeff04c
commit e8d48151d3

View File

@ -717,7 +717,7 @@ int cmCTestCoverageHandler::ProcessHandler()
std::string line; std::string line;
for ( cc= 0; cc < fcov.size(); cc ++ ) for ( cc= 0; cc < fcov.size(); cc ++ )
{ {
if ( !cmSystemTools::GetLineFromStream(ifs, line) ) if ( !cmSystemTools::GetLineFromStream(ifs, line) && cc != fcov.size() -1 )
{ {
cmOStringStream ostr; cmOStringStream ostr;
ostr << "Problem reading source file: " << fullFileName.c_str() ostr << "Problem reading source file: " << fullFileName.c_str()