summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-10-30 13:30:26 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-10-30 13:30:34 (GMT)
commitdbf5ae35b52eb55be7ea135df082cc6e84f64b7f (patch)
tree9553fb0b6976f3099fe4221e918fd793b5f4f444
parentf22d4809a4770a4f2fbd714443846f5ddf879e5b (diff)
parentfe5ba71bd0dba82d8a3093217ec1fcec1dd00ac6 (diff)
downloadCMake-dbf5ae35b52eb55be7ea135df082cc6e84f64b7f.zip
CMake-dbf5ae35b52eb55be7ea135df082cc6e84f64b7f.tar.gz
CMake-dbf5ae35b52eb55be7ea135df082cc6e84f64b7f.tar.bz2
Merge topic 'scanbuild-fixes'
fe5ba71bd0 Tests: Suppress clang scan-build warning in UTF8 test 3cf71e8c7d cmLocalGenerator: Drop unused initializer in AddUnityBuild Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3958
-rw-r--r--Source/cmLocalGenerator.cxx3
-rw-r--r--Tests/CMakeLib/testUTF8.cxx2
2 files changed, 3 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);
diff --git a/Tests/CMakeLib/testUTF8.cxx b/Tests/CMakeLib/testUTF8.cxx
index 986f595..1bf88cf 100644
--- a/Tests/CMakeLib/testUTF8.cxx
+++ b/Tests/CMakeLib/testUTF8.cxx
@@ -9,9 +9,11 @@ typedef char test_utf8_char[5];
static void test_utf8_char_print(test_utf8_char const c)
{
unsigned char const* d = reinterpret_cast<unsigned char const*>(c);
+#ifndef __clang_analyzer__ // somehow thinks arguments are not initialized
printf("[0x%02X,0x%02X,0x%02X,0x%02X]", static_cast<int>(d[0]),
static_cast<int>(d[1]), static_cast<int>(d[2]),
static_cast<int>(d[3]));
+#endif
}
static void byte_array_print(char const* s)