diff --git a/lib/nghttp2_hd.c b/lib/nghttp2_hd.c index 3aedc0fd..49ca4ae7 100644 --- a/lib/nghttp2_hd.c +++ b/lib/nghttp2_hd.c @@ -1329,11 +1329,10 @@ nghttp2_hd_nv nghttp2_hd_table_get(nghttp2_hd_context *context, size_t idx) { return hd_ringbuf_get(&context->hd_table, idx - NGHTTP2_STATIC_TABLE_LENGTH) ->nv; } else { - nghttp2_hd_static_entry *ent; - - ent = &static_table[idx]; - return (nghttp2_hd_nv){&ent->name, &ent->value, ent->token, - NGHTTP2_NV_FLAG_NONE}; + nghttp2_hd_static_entry *ent = &static_table[idx]; + nghttp2_hd_nv nv = {&ent->name, &ent->value, ent->token, + NGHTTP2_NV_FLAG_NONE}; + return nv; } } diff --git a/lib/nghttp2_rcbuf.c b/lib/nghttp2_rcbuf.c index a1af1da8..053f0dfa 100644 --- a/lib/nghttp2_rcbuf.c +++ b/lib/nghttp2_rcbuf.c @@ -94,5 +94,6 @@ void nghttp2_rcbuf_decref(nghttp2_rcbuf *rcbuf) { } nghttp2_vec nghttp2_rcbuf_get_buf(nghttp2_rcbuf *rcbuf) { - return (nghttp2_vec){rcbuf->base, rcbuf->len}; + nghttp2_vec res = {rcbuf->base, rcbuf->len}; + return res; }