aboutsummaryrefslogtreecommitdiffstats
path: root/epan/nghttp2
diff options
context:
space:
mode:
authorJoerg Mayer <jmayer@loplof.de>2015-05-01 02:49:04 +0200
committerJörg Mayer <jmayer@loplof.de>2015-05-01 00:51:02 +0000
commitf708c5cb56135515b6b777f144e90d488870c470 (patch)
tree2101b62d704bd97dfe4bbdef364e8b0aa0307522 /epan/nghttp2
parentcbeaf034befc438be4f984f8121ab4b141165ec5 (diff)
rv is only used in an assert. The assert only evaluates to code if
NDEBUG is undefined. Protect rv and its use accordingly. Change-Id: Iadbc55f74ccb797d7e812090140e636713658aa7 Reviewed-on: https://code.wireshark.org/review/8260 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Diffstat (limited to 'epan/nghttp2')
-rw-r--r--epan/nghttp2/nghttp2_hd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/epan/nghttp2/nghttp2_hd.c b/epan/nghttp2/nghttp2_hd.c
index 2f0c00228a..ea1d61430a 100644
--- a/epan/nghttp2/nghttp2_hd.c
+++ b/epan/nghttp2/nghttp2_hd.c
@@ -1733,7 +1733,9 @@ static int hd_inflate_remove_bufs(nghttp2_hd_inflater *inflater, nghttp2_nv *nv,
static int hd_inflate_remove_bufs_with_name(nghttp2_hd_inflater *inflater,
nghttp2_nv *nv,
nghttp2_hd_entry *ent_name) {
+#ifndef NDEBUG
size_t rv;
+#endif
size_t buflen;
uint8_t *buf;
nghttp2_mem *mem;
@@ -1751,7 +1753,10 @@ static int hd_inflate_remove_bufs_with_name(nghttp2_hd_inflater *inflater,
/* Copy including terminal NULL */
memcpy(buf, ent_name->nv.name, ent_name->nv.namelen + 1);
- rv = nghttp2_bufs_remove_copy(&inflater->nvbufs,
+#ifndef NDEBUG
+ rv =
+#endif
+ nghttp2_bufs_remove_copy(&inflater->nvbufs,
buf + ent_name->nv.namelen + 1);
assert(ent_name->nv.namelen + 1 + rv == buflen);