Browse Source

Remove unused variable

Found by Cppcheck.
Christoph Grüninger 1 year ago
parent
commit
95a9494974

+ 0 - 2
Source/CPack/cmCPackInnoSetupGenerator.cxx

@@ -7,7 +7,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */
 #include <cctype>
 #include <cstdlib>
 #include <ostream>
-#include <stack>
 #include <utility>
 
 #include "cmsys/RegularExpression.hxx"
@@ -613,7 +612,6 @@ bool cmCPackInnoSetupGenerator::ProcessComponents()
 
   // Components
   std::vector<cmCPackComponent*> downloadedComponents;
-  std::stack<cmCPackComponentGroup*> groups;
   for (auto& i : Components) {
     cmCPackInnoSetupKeyValuePairs params;
     cmCPackComponent* component = &i.second;

+ 0 - 2
Source/CPack/cmCPackSTGZGenerator.cxx

@@ -3,7 +3,6 @@
 #include "cmCPackSTGZGenerator.h"
 
 #include <cstdio>
-#include <sstream>
 #include <string>
 #include <vector>
 
@@ -71,7 +70,6 @@ int cmCPackSTGZGenerator::PackageFiles()
 int cmCPackSTGZGenerator::GenerateHeader(std::ostream* os)
 {
   cmCPackLogger(cmCPackLog::LOG_DEBUG, "Writing header" << std::endl);
-  std::ostringstream str;
   int counter = 0;
 
   std::string inLicFile = this->GetOption("CPACK_RESOURCE_FILE_LICENSE");

+ 0 - 1
Source/CTest/cmCTestScriptHandler.cxx

@@ -563,7 +563,6 @@ int cmCTestScriptHandler::RunCurrentScript()
 
 int cmCTestScriptHandler::CheckOutSourceDir()
 {
-  std::string command;
   std::string output;
   int retVal;
   bool res;

+ 0 - 1
Source/CTest/cmCTestTestHandler.cxx

@@ -920,7 +920,6 @@ bool cmCTestTestHandler::ComputeTestList()
   // Now create a final list of tests to run
   int cnt = 0;
   inREcnt = 0;
-  std::string last_directory;
   ListOfTests finalList;
   for (cmCTestTestProperties& tp : this->TestList) {
     cnt++;