diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2014-05-31 17:17:23 +0200 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2014-05-31 15:35:51 +0000 |
commit | 158dd9c10d6cf3ec0933e02f5bed13f07edfce98 (patch) | |
tree | 4457ece925c6c6c0de90e786c437beea189f6486 /wsutil | |
parent | 173e3024edd4729c29c907d18ece31f1cbf37240 (diff) |
nghttp2: more warning fixes
Change-Id: Ib94a02f5977bd7d456895bbe453c35d77f559bd1
Reviewed-on: https://code.wireshark.org/review/1901
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/nghttp2/nghttp2_hd.c | 8 | ||||
-rw-r--r-- | wsutil/nghttp2/nghttp2_hd_huffman.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/wsutil/nghttp2/nghttp2_hd.c b/wsutil/nghttp2/nghttp2_hd.c index 4e9915c53f..f31e74edc1 100644 --- a/wsutil/nghttp2/nghttp2_hd.c +++ b/wsutil/nghttp2/nghttp2_hd.c @@ -880,7 +880,7 @@ static search_result search_hd_table(nghttp2_hd_context *context, nghttp2_nv *nv) { search_result res = { -1, 0 }; - ssize_t i; + size_t i; uint32_t name_hash = hash(nv->name, nv->namelen); uint32_t value_hash = hash(nv->value, nv->valuelen); ssize_t left = -1, right = (ssize_t)STATIC_TABLE_LENGTH; @@ -891,10 +891,10 @@ static search_result search_hd_table(nghttp2_hd_context *context, nghttp2_hd_entry *ent = hd_ringbuf_get(&context->hd_table, i); if(ent->name_hash == name_hash && name_eq(&ent->nv, nv)) { if(res.index == -1) { - res.index = i; + res.index = (ssize_t)i; } if(ent->value_hash == value_hash && value_eq(&ent->nv, nv)) { - res.index = i; + res.index = (ssize_t)i; res.name_value_match = 1; return res; } @@ -1395,7 +1395,7 @@ static ssize_t hd_inflate_read_huff(nghttp2_hd_inflater *inflater, last = in + inflater->left; final = 1; } - rv = nghttp2_hd_huff_decode(&inflater->huff_decode_ctx, bufs, + rv = (int)nghttp2_hd_huff_decode(&inflater->huff_decode_ctx, bufs, in, last - in, final); if(rv < 0) { diff --git a/wsutil/nghttp2/nghttp2_hd_huffman.c b/wsutil/nghttp2/nghttp2_hd_huffman.c index 4cfb17b816..9c8a6c7e7a 100644 --- a/wsutil/nghttp2/nghttp2_hd_huffman.c +++ b/wsutil/nghttp2/nghttp2_hd_huffman.c @@ -133,7 +133,7 @@ int nghttp2_hd_huff_encode(nghttp2_bufs *bufs, avail = nghttp2_bufs_cur_avail(bufs); } } - rembits = huff_encode_sym(bufs, &avail, rembits, sym); + rembits = (int)huff_encode_sym(bufs, &avail, rembits, sym); if(rembits < 0) { return rembits; } @@ -166,7 +166,7 @@ ssize_t nghttp2_hd_huff_decode(nghttp2_hd_huff_decode_context *ctx, nghttp2_bufs *bufs, const uint8_t *src, size_t srclen, int final) { - ssize_t i, j; + size_t i, j; int rv; size_t avail; @@ -203,5 +203,5 @@ ssize_t nghttp2_hd_huff_decode(nghttp2_hd_huff_decode_context *ctx, if(final && !ctx->accept) { return NGHTTP2_ERR_HEADER_COMP; } - return i; + return (ssize_t)i; } |