summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2009-10-13 20:39:48 (GMT)
committerDavid Cole <david.cole@kitware.com>2009-10-13 20:39:48 (GMT)
commit85feea2d0d7e14ddda7b1c6a80217634122c691f (patch)
treecba76e0dc790bd418687756f9574a8989d863226 /Source/CTest
parent4dc224e99a53e0ffe870ee3a8564ae4ab26933d5 (diff)
downloadCMake-85feea2d0d7e14ddda7b1c6a80217634122c691f.zip
CMake-85feea2d0d7e14ddda7b1c6a80217634122c691f.tar.gz
CMake-85feea2d0d7e14ddda7b1c6a80217634122c691f.tar.bz2
Fix floating point comparison warnings. Thanks to Alex Neundorf for the patch.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestBuildAndTestHandler.cxx4
-rw-r--r--Source/CTest/cmCTestRunTest.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx
index 46d9f26..8a2d65a 100644
--- a/Source/CTest/cmCTestBuildAndTestHandler.cxx
+++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx
@@ -251,7 +251,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
tarIt != this->BuildTargets.end(); ++ tarIt )
{
double remainingTime = 0;
- if (this->Timeout)
+ if (this->Timeout > 0)
{
remainingTime = this->Timeout - cmSystemTools::GetTime() + clock_start;
if (remainingTime <= 0)
@@ -376,7 +376,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
// how much time is remaining
double remainingTime = 0;
- if (this->Timeout)
+ if (this->Timeout > 0)
{
remainingTime = this->Timeout - cmSystemTools::GetTime() + clock_start;
if (remainingTime <= 0)
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index 982beb3..6d5943d 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -419,11 +419,11 @@ bool cmCTestRunTest::CreateProcess(double testTimeOut,
// determine how much time we have
double timeout = this->CTest->GetRemainingTimeAllowed() - 120;
- if (this->CTest->GetTimeOut() && this->CTest->GetTimeOut() < timeout)
+ if (this->CTest->GetTimeOut() > 0 && this->CTest->GetTimeOut() < timeout)
{
timeout = this->CTest->GetTimeOut();
}
- if (testTimeOut
+ if (testTimeOut > 0
&& testTimeOut < this->CTest->GetRemainingTimeAllowed())
{
timeout = testTimeOut;