summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibuv
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-22 13:59:44 (GMT)
committerBrad King <brad.king@kitware.com>2023-05-22 20:51:16 (GMT)
commitb18eca763c6fce2627e4c199632c6eb4a98a5210 (patch)
tree3dc6c473d78d926c741e90270ddf4e03a6292a5b /Utilities/cmlibuv
parent5ec464a76f763ab590ca49dffa595ba183df72dc (diff)
downloadCMake-b18eca763c6fce2627e4c199632c6eb4a98a5210.zip
CMake-b18eca763c6fce2627e4c199632c6eb4a98a5210.tar.gz
CMake-b18eca763c6fce2627e4c199632c6eb4a98a5210.tar.bz2
libuv: Suppress clang-analyzer warnings
Diffstat (limited to 'Utilities/cmlibuv')
-rw-r--r--Utilities/cmlibuv/src/unix/tty.c4
-rw-r--r--Utilities/cmlibuv/src/unix/udp.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/Utilities/cmlibuv/src/unix/tty.c b/Utilities/cmlibuv/src/unix/tty.c
index 44fdb9c..d794bd5 100644
--- a/Utilities/cmlibuv/src/unix/tty.c
+++ b/Utilities/cmlibuv/src/unix/tty.c
@@ -354,6 +354,10 @@ uv_handle_type uv_guess_handle(uv_file file) {
socklen_t len;
int type;
+ #ifdef __clang_analyzer__
+ memset(&ss, 0, sizeof(ss));
+ #endif
+
if (file < 0)
return UV_UNKNOWN_HANDLE;
diff --git a/Utilities/cmlibuv/src/unix/udp.c b/Utilities/cmlibuv/src/unix/udp.c
index 4d985b8..83acf13 100644
--- a/Utilities/cmlibuv/src/unix/udp.c
+++ b/Utilities/cmlibuv/src/unix/udp.c
@@ -194,6 +194,12 @@ static int uv__udp_recvmmsg(uv_udp_t* handle, uv_buf_t* buf) {
int flags;
size_t k;
+ #ifdef __clang_analyzer__
+ /* Tell clang-analyzer the array is initialized.
+ The part we use is initialized below. */
+ memset(iov, 0, sizeof(iov));
+ #endif
+
/* prepare structures for recvmmsg */
chunks = buf->len / UV__UDP_DGRAM_MAXSIZE;
if (chunks > ARRAY_SIZE(iov))