Fix compile error with Android NDK and --enable-werror

This commit is contained in:
Tatsuhiro Tsujikawa 2015-09-25 01:45:28 +09:00
parent 6200bf3329
commit d804780c25
2 changed files with 4 additions and 2 deletions

View File

@ -1321,7 +1321,8 @@ static search_result search_hd_table(nghttp2_hd_context *context,
return res;
}
res.index = context->next_seq - 1 - ent->seq + NGHTTP2_STATIC_TABLE_LENGTH;
res.index =
(ssize_t)(context->next_seq - 1 - ent->seq + NGHTTP2_STATIC_TABLE_LENGTH);
if (exact_match) {
res.name_value_match = 1;

View File

@ -157,7 +157,8 @@ int nghttp2_hd_huff_encode(nghttp2_bufs *bufs, const uint8_t *src,
const nghttp2_huff_sym *sym = &huff_sym_table[256];
assert(avail);
/* Caution we no longer adjust avail here */
nghttp2_bufs_fast_orb(bufs, (uint8_t)(sym->code >> (sym->nbits - rembits)));
nghttp2_bufs_fast_orb(
bufs, (uint8_t)(sym->code >> (sym->nbits - (size_t)rembits)));
}
return 0;