diff options
author | Brad King <brad.king@kitware.com> | 2022-04-06 20:02:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-04-06 20:02:05 (GMT) |
commit | 75e81733223f1c90cf48879431483d45473b9865 (patch) | |
tree | df6b7b7d648ed36748612662dbc0866eb02ee427 /Source/CTest/cmCTestTestHandler.cxx | |
parent | 2646d5dfcfc4c2dd8a0824de2db5c6888476fcec (diff) | |
download | CMake-75e81733223f1c90cf48879431483d45473b9865.zip CMake-75e81733223f1c90cf48879431483d45473b9865.tar.gz CMake-75e81733223f1c90cf48879431483d45473b9865.tar.bz2 |
Source: Fix clang -Wunused-but-set-variable warnings
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index a794e3d..696a5ea 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -2486,22 +2486,19 @@ bool cmCTestTestHandler::WriteJUnitXML() // Iterate over the test results to get the number of tests that // passed, failed, etc. auto num_tests = 0; - auto num_passed = 0; auto num_failed = 0; auto num_notrun = 0; auto num_disabled = 0; SetOfTests resultsSet(this->TestResults.begin(), this->TestResults.end()); for (cmCTestTestResult const& result : resultsSet) { num_tests++; - if (result.Status == cmCTestTestHandler::COMPLETED) { - num_passed++; - } else if (result.Status == cmCTestTestHandler::NOT_RUN) { + if (result.Status == cmCTestTestHandler::NOT_RUN) { if (result.CompletionStatus == "Disabled") { num_disabled++; } else { num_notrun++; } - } else { + } else if (result.Status != cmCTestTestHandler::COMPLETED) { num_failed++; } } |