summaryrefslogtreecommitdiffstats
path: root/Source/CPack/IFW
diff options
context:
space:
mode:
authorChristoph GrĂ¼ninger <foss@grueninger.de>2024-02-14 13:27:19 (GMT)
committerChristoph GrĂ¼ninger <foss@grueninger.de>2024-02-14 19:46:03 (GMT)
commitc934a881e77bc3be402a034027962c874c9f8812 (patch)
treeec59971f7ca3543a57a5b52e85d70955a44bcef5 /Source/CPack/IFW
parent01c22dfaeed4b98a447d8e03aa6d4a67a3ab23a3 (diff)
downloadCMake-c934a881e77bc3be402a034027962c874c9f8812.zip
CMake-c934a881e77bc3be402a034027962c874c9f8812.tar.gz
CMake-c934a881e77bc3be402a034027962c874c9f8812.tar.bz2
Reduce scope of variable
Found by Cppcheck (variableScope)
Diffstat (limited to 'Source/CPack/IFW')
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
index 5724175..8047729 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
@@ -55,7 +55,6 @@ int cmCPackIFWGenerator::PackageFiles()
std::vector<std::string> cmCPackIFWGenerator::BuildRepogenCommand()
{
std::vector<std::string> ifwCmd;
- std::string ifwArg;
ifwCmd.emplace_back(this->RepoGen);
@@ -104,7 +103,7 @@ std::vector<std::string> cmCPackIFWGenerator::BuildRepogenCommand()
if (!this->OnlineOnly && !this->DownloadedPackages.empty()) {
ifwCmd.emplace_back("-i");
auto it = this->DownloadedPackages.begin();
- ifwArg = (*it)->Name;
+ std::string ifwArg = (*it)->Name;
++it;
while (it != this->DownloadedPackages.end()) {
ifwArg += "," + (*it)->Name;