Commit dbf5ae35 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'scanbuild-fixes'

fe5ba71b Tests: Suppress clang scan-build warning in UTF8 test
3cf71e8c

 cmLocalGenerator: Drop unused initializer in AddUnityBuild
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !3958
parents f22d4809 fe5ba71b
Pipeline #149599 failed with stage
in 0 seconds
......@@ -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);
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment