summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-10-28 19:51:52 (GMT)
committerBrad King <brad.king@kitware.com>2019-10-28 19:52:55 (GMT)
commit3cf71e8c7d7a1ed83db5ea6e5a110346807b307b (patch)
tree38fd8e734f7cd037ca67f726ed9231a627288603 /Source/cmLocalGenerator.cxx
parent92eb3a4475e92d993b901c06d967210912390ada (diff)
downloadCMake-3cf71e8c7d7a1ed83db5ea6e5a110346807b307b.zip
CMake-3cf71e8c7d7a1ed83db5ea6e5a110346807b307b.tar.gz
CMake-3cf71e8c7d7a1ed83db5ea6e5a110346807b307b.tar.bz2
cmLocalGenerator: Drop unused initializer in AddUnityBuild
Fix a warning from clang-scanbuild: warning: Value stored to 'chunk' during its initialization is never read for (size_t itemsLeft = filtered_sources.size(), chunk = batchSize, ^~~~~ ~~~~~~~~~ Simply remove the initializer.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index a2eb1b9..8879040 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2453,8 +2453,7 @@ void cmLocalGenerator::AddUnityBuild(cmGeneratorTarget* target)
batchSize = filtered_sources.size();
}
- for (size_t itemsLeft = filtered_sources.size(), chunk = batchSize,
- batch = 0;
+ for (size_t itemsLeft = filtered_sources.size(), chunk, batch = 0;
itemsLeft > 0; itemsLeft -= chunk, ++batch) {
chunk = std::min(itemsLeft, batchSize);