summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-22 14:00:42 (GMT)
committerBrad King <brad.king@kitware.com>2023-05-22 20:51:16 (GMT)
commit395f0cb69c8db2b4a36dc40d9776df9bea5afdb1 (patch)
tree0d6683655fac20f2655583285df1d3071f40b73a /Utilities
parentb18eca763c6fce2627e4c199632c6eb4a98a5210 (diff)
downloadCMake-395f0cb69c8db2b4a36dc40d9776df9bea5afdb1.zip
CMake-395f0cb69c8db2b4a36dc40d9776df9bea5afdb1.tar.gz
CMake-395f0cb69c8db2b4a36dc40d9776df9bea5afdb1.tar.bz2
nghttp2: Suppress clang-analyzer warnings
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/cmnghttp2/lib/nghttp2_buf.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/Utilities/cmnghttp2/lib/nghttp2_buf.c b/Utilities/cmnghttp2/lib/nghttp2_buf.c
index a328447..ce51251 100644
--- a/Utilities/cmnghttp2/lib/nghttp2_buf.c
+++ b/Utilities/cmnghttp2/lib/nghttp2_buf.c
@@ -26,6 +26,10 @@
#include <stdio.h>
+#ifdef __clang_analyzer__
+#include <assert.h>
+#endif
+
#include "nghttp2_helper.h"
#include "nghttp2_debug.h"
@@ -386,6 +390,10 @@ int nghttp2_bufs_addb(nghttp2_bufs *bufs, uint8_t b) {
return rv;
}
+#ifdef __clang_analyzer__
+ assert(bufs->cur->buf.last);
+#endif
+
*bufs->cur->buf.last++ = b;
return 0;
@@ -399,6 +407,10 @@ int nghttp2_bufs_addb_hold(nghttp2_bufs *bufs, uint8_t b) {
return rv;
}
+#ifdef __clang_analyzer__
+ assert(bufs->cur->buf.last);
+#endif
+
*bufs->cur->buf.last = b;
return 0;
@@ -412,6 +424,10 @@ int nghttp2_bufs_orb(nghttp2_bufs *bufs, uint8_t b) {
return rv;
}
+#ifdef __clang_analyzer__
+ assert(bufs->cur->buf.last);
+#endif
+
*bufs->cur->buf.last++ |= b;
return 0;