Repository: trafficserver Updated Branches: refs/heads/master a39dd9d7c -> 42d687c47
TS-4092: Initialize a variable explicitly Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/42d687c4 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/42d687c4 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/42d687c4 Branch: refs/heads/master Commit: 42d687c47c927c10d4a351bee20d8c5a8f9b00ad Parents: a39dd9d Author: Masakazu Kitajo <mas...@apache.org> Authored: Sat Apr 2 01:05:32 2016 +0900 Committer: Masakazu Kitajo <mas...@apache.org> Committed: Sat Apr 2 01:05:32 2016 +0900 ---------------------------------------------------------------------- proxy/http2/HPACK.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/42d687c4/proxy/http2/HPACK.cc ---------------------------------------------------------------------- diff --git a/proxy/http2/HPACK.cc b/proxy/http2/HPACK.cc index c6de481..c1598ee 100644 --- a/proxy/http2/HPACK.cc +++ b/proxy/http2/HPACK.cc @@ -903,7 +903,7 @@ hpack_encode_header_block(HpackIndexingTable &indexing_table, uint8_t *out_buf, { uint8_t *cursor = out_buf; const uint8_t *const out_buf_end = out_buf + out_buf_len; - int64_t written; + int64_t written = 0; ink_assert(http_hdr_type_get(hdr->m_http) != HTTP_TYPE_UNKNOWN); @@ -936,6 +936,10 @@ hpack_encode_header_block(HpackIndexingTable &indexing_table, uint8_t *out_buf, case HPACK_EXACT_MATCH: written = encode_indexed_header_field(cursor, out_buf_end, result.index); break; + default: + // Does it happen? + written = 0; + break; } if (written == HPACK_ERROR_COMPRESSION_ERROR) { return HPACK_ERROR_COMPRESSION_ERROR;