mirror of
https://gitee.com/openharmony/third_party_nghttp2
synced 2024-11-27 10:00:40 +00:00
Fix some other shorten-64-to-32 casting error found by MSVC (64bits)
Thanks to Pascal
This commit is contained in:
parent
6c71889552
commit
ec93c9f55f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user