diff options
author | David Cole <david.cole@kitware.com> | 2010-06-27 15:22:05 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2010-06-27 15:22:05 (GMT) |
commit | 415900ba77648c2472bb2022c46136830a627562 (patch) | |
tree | ae6ad0c55510934ca89bc88aa2a8f759b14de89a /Source/CTest/cmCTestTestHandler.cxx | |
parent | 4745f4996b73a778f6bdd25669c59b6a6c115fe4 (diff) | |
download | CMake-415900ba77648c2472bb2022c46136830a627562.zip CMake-415900ba77648c2472bb2022c46136830a627562.tar.gz CMake-415900ba77648c2472bb2022c46136830a627562.tar.bz2 |
Eliminate -Wconversion warnings.
Change types of local variables, or casting, or re-arrange
expressions to get rid of "conversion may alter value" warnings
as seen on recent dashboard submissions from londinium.kitware.
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index d2742ec..a4a4863 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1048,7 +1048,7 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed, if(randomSchedule) { - p.Cost = rand(); + p.Cost = static_cast<float>(rand()); } if(p.Timeout == 0 && this->CTest->GetGlobalTimeout() != 0) @@ -1309,7 +1309,8 @@ std::string cmCTestTestHandler::EncodeFile(std::string file) cmSystemTools::RemoveFile(tarFile.c_str()); unsigned char *encoded_buffer - = new unsigned char [ static_cast<int>(len * 1.5 + 5) ]; + = new unsigned char [ static_cast<int>( + static_cast<double>(len) * 1.5 + 5.0) ]; unsigned long rlen = cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1); @@ -1881,7 +1882,8 @@ std::string cmCTestTestHandler::GenerateRegressionImages( unsigned char *file_buffer = new unsigned char [ len + 1 ]; ifs.read(reinterpret_cast<char*>(file_buffer), len); unsigned char *encoded_buffer - = new unsigned char [ static_cast<int>(len * 1.5 + 5) ]; + = new unsigned char [ static_cast<int>( + static_cast<double>(len) * 1.5 + 5.0) ]; unsigned long rlen = cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1); |