diff options
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmnghttp2/lib/nghttp2_buf.c | 16 |
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; |