diff options
author | David Cole <david.cole@kitware.com> | 2009-10-02 19:30:01 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2009-10-02 19:30:01 (GMT) |
commit | ccb0cf130673b55035106067997e9d135d4d27fa (patch) | |
tree | ad0e4fe75d4036e576a6b2992a15baeb7c79fcb8 /Source/CTest | |
parent | 837364cb04a53a0fd3f5150da4f56524066fe2a7 (diff) | |
download | CMake-ccb0cf130673b55035106067997e9d135d4d27fa.zip CMake-ccb0cf130673b55035106067997e9d135d4d27fa.tar.gz CMake-ccb0cf130673b55035106067997e9d135d4d27fa.tar.bz2 |
Fix warnings in CMake source code.
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 5 | ||||
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 10 |
2 files changed, 8 insertions, 7 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 7ab9cac..c62dbce 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -251,7 +251,8 @@ bool cmCTestMultiProcessHandler::CheckOutput() this->TestRunningMap[test] = false; this->RunningTests.erase(p); this->WriteCheckpoint(test); - this->WriteCostData(test, p->GetTestResults().ExecutionTime); + this->WriteCostData(test, static_cast<float>( + p->GetTestResults().ExecutionTime)); this->RunningCount -= GetProcessorsUsed(test); delete p; } @@ -276,7 +277,7 @@ void cmCTestMultiProcessHandler::ReadCostData() cmSystemTools::SplitString(line.c_str(), ' '); int index = atoi(parts[0].c_str()); - float cost = atof(parts[1].c_str()); + float cost = static_cast<float>(atof(parts[1].c_str())); if(this->Properties[index] && this->Properties[index]->Cost == 0) { this->Properties[index]->Cost = cost; diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 2ad2e37..5090cd0 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -574,16 +574,16 @@ int cmCTestTestHandler::ProcessHandler() } } - float percent = float(passed.size()) * 100.0f / total; + float percent = float(passed.size()) * 100.0f / float(total); if ( failed.size() > 0 && percent > 99) { percent = 99; } - + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl << static_cast<int>(percent + .5) << "% tests passed, " - << failed.size() << " tests failed out of " - << total << std::endl); + << failed.size() << " tests failed out of " + << total << std::endl); if(this->CTest->GetLabelSummary()) { this->PrintLabelSummary(); @@ -1982,7 +1982,7 @@ bool cmCTestTestHandler::SetTestsProperties( } if ( key == "COST" ) { - rtit->Cost = atof(val.c_str()); + rtit->Cost = static_cast<float>(atof(val.c_str())); } if ( key == "RUN_SERIAL" ) { |