1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-05-08 22:37:04 +08:00

nghttp2: Suppress clang-analyzer warnings

This commit is contained in:
Brad King 2023-05-22 10:00:42 -04:00
parent b18eca763c
commit 395f0cb69c

View File

@ -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;