COMP: fix more warnings

This commit is contained in:
Bill Hoffman 2008-07-04 10:10:30 -04:00
parent fba54c56f2
commit 112d377fbb
1 changed files with 20 additions and 15 deletions

View File

@ -1004,20 +1004,21 @@ bool cmCTestTestHandler::GetValue(const char* tag,
std::ifstream& fin) std::ifstream& fin)
{ {
std::string line; std::string line;
bool ret = true;
cmSystemTools::GetLineFromStream(fin, line); cmSystemTools::GetLineFromStream(fin, line);
if(line == tag) if(line == tag)
{ {
fin >> value; fin >> value;
cmSystemTools::GetLineFromStream(fin, line); // read blank line ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
} }
else else
{ {
cmCTestLog(this->CTest, ERROR_MESSAGE, cmCTestLog(this->CTest, ERROR_MESSAGE,
"parse error: missing tag: " "parse error: missing tag: "
<< tag << " found [" << line << "]" << std::endl); << tag << " found [" << line << "]" << std::endl);
return false; ret = false;
} }
return true; return ret;
} }
bool cmCTestTestHandler::GetValue(const char* tag, bool cmCTestTestHandler::GetValue(const char* tag,
@ -1026,19 +1027,20 @@ bool cmCTestTestHandler::GetValue(const char* tag,
{ {
std::string line; std::string line;
cmSystemTools::GetLineFromStream(fin, line); cmSystemTools::GetLineFromStream(fin, line);
bool ret = true;
if(line == tag) if(line == tag)
{ {
fin >> value; fin >> value;
cmSystemTools::GetLineFromStream(fin, line); // read blank line ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
} }
else else
{ {
cmCTestLog(this->CTest, ERROR_MESSAGE, cmCTestLog(this->CTest, ERROR_MESSAGE,
"parse error: missing tag: " "parse error: missing tag: "
<< tag << " found [" << line << "]" << std::endl); << tag << " found [" << line << "]" << std::endl);
return false; ret = false;
} }
return true; return ret;
} }
bool cmCTestTestHandler::GetValue(const char* tag, bool cmCTestTestHandler::GetValue(const char* tag,
@ -1047,19 +1049,20 @@ bool cmCTestTestHandler::GetValue(const char* tag,
{ {
std::string line; std::string line;
cmSystemTools::GetLineFromStream(fin, line); cmSystemTools::GetLineFromStream(fin, line);
bool ret = true;
if(line == tag) if(line == tag)
{ {
fin >> value; fin >> value;
cmSystemTools::GetLineFromStream(fin, line); // read blank line ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
} }
else else
{ {
cmCTestLog(this->CTest, ERROR_MESSAGE, cmCTestLog(this->CTest, ERROR_MESSAGE,
"parse error: missing tag: " "parse error: missing tag: "
<< tag << " found [" << line << "]" << std::endl); << tag << " found [" << line << "]" << std::endl);
return false; ret = false;
} }
return true; return ret;
} }
bool cmCTestTestHandler::GetValue(const char* tag, bool cmCTestTestHandler::GetValue(const char* tag,
@ -1068,19 +1071,20 @@ bool cmCTestTestHandler::GetValue(const char* tag,
{ {
std::string line; std::string line;
cmSystemTools::GetLineFromStream(fin, line); cmSystemTools::GetLineFromStream(fin, line);
bool ret = true;
if(line == tag) if(line == tag)
{ {
fin >> value; fin >> value;
cmSystemTools::GetLineFromStream(fin, line); // read blank line ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
} }
else else
{ {
cmCTestLog(this->CTest, ERROR_MESSAGE, cmCTestLog(this->CTest, ERROR_MESSAGE,
"parse error: missing tag: " "parse error: missing tag: "
<< tag << " found [" << line.c_str() << "]" << std::endl); << tag << " found [" << line.c_str() << "]" << std::endl);
return false; ret = false;
} }
return true; return ret;
} }
bool cmCTestTestHandler::GetValue(const char* tag, bool cmCTestTestHandler::GetValue(const char* tag,
@ -1089,18 +1093,19 @@ bool cmCTestTestHandler::GetValue(const char* tag,
{ {
std::string line; std::string line;
cmSystemTools::GetLineFromStream(fin, line); cmSystemTools::GetLineFromStream(fin, line);
bool ret = true;
if(line == tag) if(line == tag)
{ {
return cmSystemTools::GetLineFromStream(fin, value); ret = cmSystemTools::GetLineFromStream(fin, value);
} }
else else
{ {
cmCTestLog(this->CTest, ERROR_MESSAGE, cmCTestLog(this->CTest, ERROR_MESSAGE,
"parse error: missing tag: " "parse error: missing tag: "
<< tag << " found [" << line << "]" << std::endl); << tag << " found [" << line << "]" << std::endl);
return false; ret = false;
} }
return true; return ret;
} }