summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2014-08-05 14:22:36 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2014-08-05 14:22:36 (GMT)
commit2cac483e64835329e4eec2d2fad5001895d0e7fe (patch)
tree7b9f14970d623dc9a6ec95375033a874708868f2 /Source/CPack
parentaea40fcb43f3b3496c79948e4e4fe08dbe4086d5 (diff)
downloadCMake-2cac483e64835329e4eec2d2fad5001895d0e7fe.zip
CMake-2cac483e64835329e4eec2d2fad5001895d0e7fe.tar.gz
CMake-2cac483e64835329e4eec2d2fad5001895d0e7fe.tar.bz2
Fix used value warning.
packageFileName no longer has only one value in this function. Move the declaration into the loop and remove its initial and unused asignment.
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackGenerator.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 9336bed..1461bb1 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -1049,7 +1049,6 @@ int cmCPackGenerator::DoPackage()
const char* tempPackageFileName = this->GetOption(
"CPACK_TEMPORARY_PACKAGE_FILE_NAME");
- const char* packageFileName = this->GetOption("CPACK_OUTPUT_FILE_PATH");
const char* tempDirectory = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Find files" << std::endl);
@@ -1114,7 +1113,7 @@ int cmCPackGenerator::DoPackage()
std::string tmpPF(this->GetOption("CPACK_OUTPUT_FILE_PREFIX"));
tempPackageFileName = it->c_str();
tmpPF += "/"+cmSystemTools::GetFilenameName(*it);
- packageFileName = tmpPF.c_str();
+ const char* packageFileName = tmpPF.c_str();
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy final package(s): "
<< (tempPackageFileName ? tempPackageFileName : "(NULL)" )
<< " to "