diff options
author | Brad King <brad.king@kitware.com> | 2019-10-28 19:51:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-10-28 19:52:55 (GMT) |
commit | 3cf71e8c7d7a1ed83db5ea6e5a110346807b307b (patch) | |
tree | 38fd8e734f7cd037ca67f726ed9231a627288603 /Source/cmLocalGenerator.cxx | |
parent | 92eb3a4475e92d993b901c06d967210912390ada (diff) | |
download | CMake-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.cxx | 3 |
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); |