From e58db4f8b0ba733c711250315c43db8240d90b64 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 14 Mar 2016 00:54:02 +0900 Subject: [PATCH] Attempt to fix compile error with msvc --- lib/nghttp2_hd.c | 9 ++++----- lib/nghttp2_rcbuf.c | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) 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; }