summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLib/testUTF8.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-10-29 15:20:47 (GMT)
committerBrad King <brad.king@kitware.com>2019-10-29 15:20:47 (GMT)
commitfe5ba71bd0dba82d8a3093217ec1fcec1dd00ac6 (patch)
treef781c455ffe6d5dc302ca3d9cfc577aeb6f860d4 /Tests/CMakeLib/testUTF8.cxx
parent3cf71e8c7d7a1ed83db5ea6e5a110346807b307b (diff)
downloadCMake-fe5ba71bd0dba82d8a3093217ec1fcec1dd00ac6.zip
CMake-fe5ba71bd0dba82d8a3093217ec1fcec1dd00ac6.tar.gz
CMake-fe5ba71bd0dba82d8a3093217ec1fcec1dd00ac6.tar.bz2
Tests: Suppress clang scan-build warning in UTF8 test
Clang scan-build 7 reports: ``` Tests/CMakeLib/testUTF8.cxx:12:3: warning: 4th function call argument is an uninitialized value printf("[0x%02X,0x%02X,0x%02X,0x%02X]", static_cast<int>(d[0]), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Manual tracing of all call sites shows that all values are initialized.
Diffstat (limited to 'Tests/CMakeLib/testUTF8.cxx')
-rw-r--r--Tests/CMakeLib/testUTF8.cxx2
1 files changed, 2 insertions, 0 deletions
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)