Commit ec93c9f5 authored by Alexis La Goutte's avatar Alexis La Goutte

Fix some other shorten-64-to-32 casting error found by MSVC (64bits)

Thanks to Pascal
parent 6c718895
......@@ -515,7 +515,7 @@ static ssize_t decode_length(uint32_t *res, size_t *shift_ptr, int *final,
if(++in == last) {
*res = n;
return in - start;
return (ssize_t)(in - start);
}
}
......@@ -545,12 +545,12 @@ static ssize_t decode_length(uint32_t *res, size_t *shift_ptr, int *final,
if(in == last) {
*res = n;
return in - start;
return (ssize_t)(in - start);
}
*res = n;
*final = 1;
return in + 1 - start;
return (ssize_t)(in + 1 - start);
}
static int emit_table_size(nghttp2_bufs *bufs, size_t table_size)
......@@ -871,10 +871,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 = (ssize_t)i + NGHTTP2_STATIC_TABLE_LENGTH;
res.index = (ssize_t)(i + NGHTTP2_STATIC_TABLE_LENGTH);
}
if(ent->value_hash == value_hash && value_eq(&ent->nv, nv)) {
res.index = (ssize_t)i + NGHTTP2_STATIC_TABLE_LENGTH;
res.index = (ssize_t)(i + NGHTTP2_STATIC_TABLE_LENGTH);
res.name_value_match = 1;
return res;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment