浏览代码

Fix trivial clang -Wdouble-promotion warnings

Sean McBride 10 年之前
父节点
当前提交
710d8bab7e
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      Source/CTest/cmCTestCoverageHandler.cxx
  2. 1 1
      Source/CTest/cmCTestTestHandler.cxx

+ 1 - 1
Source/CTest/cmCTestCoverageHandler.cxx

@@ -2287,7 +2287,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
         {
         cper /= 2.0f;
         }
-      percent_coverage += cper;
+      percent_coverage += static_cast<double>(cper);
       float cmet = static_cast<float>(percentFunction + percentBranch);
       if(totalBranches > 0)
         {

+ 1 - 1
Source/CTest/cmCTestTestHandler.cxx

@@ -579,7 +579,7 @@ int cmCTestTestHandler::ProcessHandler()
       }
 
     cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl
-               << static_cast<int>(percent + .5) << "% tests passed, "
+               << static_cast<int>(percent + .5f) << "% tests passed, "
                << failed.size() << " tests failed out of "
                << total << std::endl);
     if(this->CTest->GetLabelSummary())