diff options
author | Brad King <brad.king@kitware.com> | 2023-05-22 13:59:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-05-22 20:51:16 (GMT) |
commit | b18eca763c6fce2627e4c199632c6eb4a98a5210 (patch) | |
tree | 3dc6c473d78d926c741e90270ddf4e03a6292a5b /Utilities/cmlibuv | |
parent | 5ec464a76f763ab590ca49dffa595ba183df72dc (diff) | |
download | CMake-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.c | 4 | ||||
-rw-r--r-- | Utilities/cmlibuv/src/unix/udp.c | 6 |
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)) |