diff options
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestBuildHandler.cxx | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 12 | ||||
-rw-r--r-- | Source/CTest/cmCTestCurl.cxx | 8 | ||||
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 5 | ||||
-rw-r--r-- | Source/CTest/cmCTestSubmitHandler.cxx | 10 | ||||
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 4 | ||||
-rw-r--r-- | Source/CTest/cmParseCoberturaCoverage.cxx | 2 |
8 files changed, 22 insertions, 23 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index a455908..3bf54f0 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -948,7 +948,7 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, size_t length, this->BuildOutputLogSize += length; // until there are any lines left in the buffer - while (1) { + while (true) { // Find the end of line t_BuildProcessingQueueType::iterator it; for (it = queue->begin(); it != queue->end(); ++it) { diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index b7ac969..989c096 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -977,7 +977,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage( std::set<std::string> missingFiles; - std::string actualSourceFile = ""; + std::string actualSourceFile; cmCTestOptionalLog( this->CTest, HANDLER_OUTPUT, " Processing coverage (each . represents one file):" << std::endl, @@ -1006,8 +1006,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage( cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, command << std::endl, this->Quiet); - std::string output = ""; - std::string errors = ""; + std::string output; + std::string errors; int retVal = 0; *cont->OFS << "* Run coverage for: " << fileDir << std::endl; *cont->OFS << " Command: " << command << std::endl; @@ -1344,7 +1344,7 @@ int cmCTestCoverageHandler::HandleLCovCoverage( std::set<std::string> missingFiles; - std::string actualSourceFile = ""; + std::string actualSourceFile; cmCTestOptionalLog( this->CTest, HANDLER_OUTPUT, " Processing coverage (each . represents one file):" << std::endl, @@ -1371,8 +1371,8 @@ int cmCTestCoverageHandler::HandleLCovCoverage( cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, command << std::endl, this->Quiet); - std::string output = ""; - std::string errors = ""; + std::string output; + std::string errors; int retVal = 0; *cont->OFS << "* Run coverage for: " << fileDir << std::endl; *cont->OFS << " Command: " << command << std::endl; diff --git a/Source/CTest/cmCTestCurl.cxx b/Source/CTest/cmCTestCurl.cxx index a3c13c4..9a90f54 100644 --- a/Source/CTest/cmCTestCurl.cxx +++ b/Source/CTest/cmCTestCurl.cxx @@ -38,8 +38,8 @@ std::string cmCTestCurl::Escape(std::string const& source) } namespace { -static size_t curlWriteMemoryCallback(void* ptr, size_t size, size_t nmemb, - void* data) +size_t curlWriteMemoryCallback(void* ptr, size_t size, size_t nmemb, + void* data) { int realsize = (int)(size * nmemb); @@ -49,8 +49,8 @@ static size_t curlWriteMemoryCallback(void* ptr, size_t size, size_t nmemb, return realsize; } -static size_t curlDebugCallback(CURL* /*unused*/, curl_infotype /*unused*/, - char* chPtr, size_t size, void* data) +size_t curlDebugCallback(CURL* /*unused*/, curl_infotype /*unused*/, + char* chPtr, size_t size, void* data) { std::vector<char>* vec = static_cast<std::vector<char>*>(data); vec->insert(vec->end(), chPtr, chPtr + size); diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 1766aef..c1724ab 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -256,7 +256,7 @@ void cmCTestMultiProcessHandler::StartNextTests() bool allTestsFailedTestLoadCheck = false; bool usedFakeLoadForTesting = false; size_t minProcessorsRequired = this->ParallelLevel; - std::string testWithMinProcessors = ""; + std::string testWithMinProcessors; cmsys::SystemInformation info; diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index fbc94cc..5c45fe5 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -119,10 +119,9 @@ void cmCTestRunTest::CompressOutput() strm.next_out = out; ret = deflate(&strm, Z_FINISH); - if (ret == Z_STREAM_ERROR || ret != Z_STREAM_END) { + if (ret != Z_STREAM_END) { cmCTestLog(this->CTest, ERROR_MESSAGE, - "Error during output " - "compression. Sending uncompressed output." + "Error during output compression. Sending uncompressed output." << std::endl); delete[] out; return; diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 0f13c1e..79c3663 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -388,7 +388,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix, *this->LogFile << "\tUpload file: " << local_file << " to " << remote_file << std::endl; - std::string ofile = ""; + std::string ofile; for (kk = 0; kk < remote_file.size(); kk++) { char c = remote_file[kk]; char hexCh[4] = { 0, 0, 0, 0 }; @@ -582,7 +582,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix, void cmCTestSubmitHandler::ParseResponse( cmCTestSubmitHandlerVectorOfChar chunk) { - std::string output = ""; + std::string output; output.append(chunk.begin(), chunk.end()); if (output.find("<cdash") != output.npos) { @@ -662,7 +662,7 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(const std::set<std::string>& files, ::curl_easy_setopt(curl, CURLOPT_DEBUGDATA, (void*)&chunkDebug); std::string rfile = remoteprefix + cmSystemTools::GetFilenameName(*file); - std::string ofile = ""; + std::string ofile; std::string::iterator kk; for (kk = rfile.begin(); kk < rfile.end(); ++kk) { char c = *kk; @@ -748,7 +748,7 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command, { if (scp_command.empty() || localprefix.empty() || files.empty() || remoteprefix.empty() || url.empty()) { - return 0; + return false; } std::vector<const char*> argv; @@ -852,7 +852,7 @@ bool cmCTestSubmitHandler::SubmitUsingCP(const std::string& localprefix, << "\tremoteprefix: " << remoteprefix << "\n" << "\tdestination: " << destination << std::endl); /* clang-format on */ - return 0; + return false; } cmCTest::SetOfStrings::const_iterator file; diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 68f9a54..4e63654 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -718,7 +718,7 @@ void cmCTestTestHandler::ComputeTestList() // Now create a final list of tests to run int cnt = 0; inREcnt = 0; - std::string last_directory = ""; + std::string last_directory; ListOfTests finalList; for (it = this->TestList.begin(); it != this->TestList.end(); it++) { cnt++; @@ -1649,7 +1649,7 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed() int numFiles = static_cast<int>(cmsys::Directory::GetNumberOfFilesInDirectory(dirName)); std::string pattern = "LastTestsFailed"; - std::string logName = ""; + std::string logName; for (int i = 0; i < numFiles; ++i) { std::string fileName = directory.GetFile(i); diff --git a/Source/CTest/cmParseCoberturaCoverage.cxx b/Source/CTest/cmParseCoberturaCoverage.cxx index 0b6d3ce..db17748 100644 --- a/Source/CTest/cmParseCoberturaCoverage.cxx +++ b/Source/CTest/cmParseCoberturaCoverage.cxx @@ -54,7 +54,7 @@ protected: void StartElement(const std::string& name, const char** atts) CM_OVERRIDE { std::string FoundSource; - std::string finalpath = ""; + std::string finalpath; if (name == "source") { this->InSource = true; } else if (name == "sources") { |