From f78673075ae22f19082d0c5177f5983d61669995 Mon Sep 17 00:00:00 2001 From: Lucas Pardue Date: Tue, 25 Apr 2017 16:22:14 +0100 Subject: [PATCH] Address CI build errors/warnings --- lib/nghttp2_frame.c | 9 ++------- lib/nghttp2_frame.h | 1 - lib/nghttp2_session.c | 2 +- tests/nghttp2_session_test.h | 3 +++ 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/nghttp2_frame.c b/lib/nghttp2_frame.c index 326233fe..0df97006 100644 --- a/lib/nghttp2_frame.c +++ b/lib/nghttp2_frame.c @@ -792,15 +792,10 @@ void nghttp2_frame_unpack_origin_payload(nghttp2_extension *frame, size_t origin_len, uint8_t *payload, size_t payloadlen) { nghttp2_ext_origin *origin_frame; - uint8_t *p; + (void)payloadlen; origin_frame = frame->payload; - p = payload; - - origin_frame->origin = p; - - p += origin_len; - + origin_frame->origin = payload; origin_frame->origin_len = origin_len; } diff --git a/lib/nghttp2_frame.h b/lib/nghttp2_frame.h index 7e68faf2..cf0dd597 100644 --- a/lib/nghttp2_frame.h +++ b/lib/nghttp2_frame.h @@ -431,7 +431,6 @@ void nghttp2_frame_unpack_origin_payload(nghttp2_extension *frame, int nghttp2_frame_unpack_origin_payload2(nghttp2_extension *frame, const uint8_t *payload, size_t payloadlen, nghttp2_mem *mem); - /* * Initializes HEADERS frame |frame| with given values. |frame| takes * ownership of |nva|, so caller must not free it. If |stream_id| is diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c index 090c85a2..8b157caf 100644 --- a/lib/nghttp2_session.c +++ b/lib/nghttp2_session.c @@ -5824,6 +5824,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in, iframe->state = NGHTTP2_IB_READ_NBYTE; inbound_frame_set_mark(iframe, 2); + break; case NGHTTP2_ORIGIN: if ((session->builtin_recv_ext_types & NGHTTP2_TYPEMASK_ORIGIN) == 0) { @@ -5855,7 +5856,6 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in, inbound_frame_set_mark(iframe, 2); break; - break; default: busy = 1; diff --git a/tests/nghttp2_session_test.h b/tests/nghttp2_session_test.h index 470b274c..60989e2d 100644 --- a/tests/nghttp2_session_test.h +++ b/tests/nghttp2_session_test.h @@ -46,6 +46,7 @@ void test_nghttp2_session_recv_settings_header_table_size(void); void test_nghttp2_session_recv_too_large_frame_length(void); void test_nghttp2_session_recv_extension(void); void test_nghttp2_session_recv_altsvc(void); +void test_nghttp2_session_recv_origin(void); void test_nghttp2_session_continue(void); void test_nghttp2_session_add_frame(void); void test_nghttp2_session_on_request_headers_received(void); @@ -62,6 +63,7 @@ void test_nghttp2_session_on_window_update_received(void); void test_nghttp2_session_on_data_received(void); void test_nghttp2_session_on_data_received_fail_fast(void); void test_nghttp2_session_on_altsvc_received(void); +void test_nghttp2_session_on_origin_received(void); void test_nghttp2_session_send_headers_start_stream(void); void test_nghttp2_session_send_headers_reply(void); void test_nghttp2_session_send_headers_frame_size_error(void); @@ -99,6 +101,7 @@ void test_nghttp2_submit_shutdown_notice(void); void test_nghttp2_submit_invalid_nv(void); void test_nghttp2_submit_extension(void); void test_nghttp2_submit_altsvc(void); +void test_nghttp2_submit_origin(void); void test_nghttp2_session_open_stream(void); void test_nghttp2_session_open_stream_with_idle_stream_dep(void); void test_nghttp2_session_get_next_ob_item(void);