Fix some "Value stored to 'stream' is never read" found by Clang Analyzer
This commit is contained in:
parent
3b6b4ff066
commit
5f05135d1b
|
@ -2336,7 +2336,7 @@ void test_nghttp2_session_on_push_promise_received(void) {
|
|||
|
||||
nghttp2_session_client_new(&session, &callbacks, &user_data);
|
||||
|
||||
stream = nghttp2_session_open_stream(session, 2, NGHTTP2_STREAM_FLAG_NONE,
|
||||
nghttp2_session_open_stream(session, 2, NGHTTP2_STREAM_FLAG_NONE,
|
||||
&pri_spec_default,
|
||||
NGHTTP2_STREAM_RESERVED, NULL);
|
||||
/* Attempt to PUSH_PROMISE against reserved (remote) stream */
|
||||
|
@ -2357,7 +2357,7 @@ void test_nghttp2_session_on_push_promise_received(void) {
|
|||
/* Disable PUSH */
|
||||
nghttp2_session_client_new(&session, &callbacks, &user_data);
|
||||
|
||||
stream = nghttp2_session_open_stream(session, 1, NGHTTP2_STREAM_FLAG_NONE,
|
||||
nghttp2_session_open_stream(session, 1, NGHTTP2_STREAM_FLAG_NONE,
|
||||
&pri_spec_default,
|
||||
NGHTTP2_STREAM_OPENING, NULL);
|
||||
|
||||
|
@ -2380,7 +2380,7 @@ void test_nghttp2_session_on_push_promise_received(void) {
|
|||
/* Check malformed headers. We accept malformed headers */
|
||||
nghttp2_session_client_new(&session, &callbacks, &user_data);
|
||||
|
||||
stream = nghttp2_session_open_stream(session, 1, NGHTTP2_STREAM_FLAG_NONE,
|
||||
nghttp2_session_open_stream(session, 1, NGHTTP2_STREAM_FLAG_NONE,
|
||||
&pri_spec_default,
|
||||
NGHTTP2_STREAM_OPENING, NULL);
|
||||
nvlen = ARRLEN(malformed_nva);
|
||||
|
@ -2401,7 +2401,7 @@ void test_nghttp2_session_on_push_promise_received(void) {
|
|||
peer, incoming PUSH_PROMISE is rejected */
|
||||
nghttp2_session_client_new(&session, &callbacks, &user_data);
|
||||
|
||||
stream = nghttp2_session_open_stream(session, 1, NGHTTP2_STREAM_FLAG_NONE,
|
||||
nghttp2_session_open_stream(session, 1, NGHTTP2_STREAM_FLAG_NONE,
|
||||
&pri_spec_default,
|
||||
NGHTTP2_STREAM_OPENING, NULL);
|
||||
/* Submit settings with ENABLE_PUSH = 0 (thus disabling push) */
|
||||
|
@ -2551,7 +2551,7 @@ void test_nghttp2_session_on_window_update_received(void) {
|
|||
|
||||
/* Receiving WINDOW_UPDATE on reserved (remote) stream is a
|
||||
connection error */
|
||||
stream = nghttp2_session_open_stream(session, 2, NGHTTP2_STREAM_FLAG_NONE,
|
||||
nghttp2_session_open_stream(session, 2, NGHTTP2_STREAM_FLAG_NONE,
|
||||
&pri_spec_default,
|
||||
NGHTTP2_STREAM_RESERVED, NULL);
|
||||
|
||||
|
@ -2612,7 +2612,7 @@ void test_nghttp2_session_on_data_received(void) {
|
|||
CU_ASSERT(NGHTTP2_SHUT_RD == stream->shut_flags);
|
||||
|
||||
/* If NGHTTP2_STREAM_CLOSING state, DATA frame is discarded. */
|
||||
stream = nghttp2_session_open_stream(session, 4, NGHTTP2_STREAM_FLAG_NONE,
|
||||
nghttp2_session_open_stream(session, 4, NGHTTP2_STREAM_FLAG_NONE,
|
||||
&pri_spec_default,
|
||||
NGHTTP2_STREAM_CLOSING, NULL);
|
||||
|
||||
|
@ -3643,7 +3643,7 @@ void test_nghttp2_submit_headers_push_reply(void) {
|
|||
/* Sending HEADERS from client against stream in reserved state is
|
||||
error */
|
||||
CU_ASSERT(0 == nghttp2_session_client_new(&session, &callbacks, &ud));
|
||||
stream = nghttp2_session_open_stream(session, 2, NGHTTP2_STREAM_FLAG_NONE,
|
||||
nghttp2_session_open_stream(session, 2, NGHTTP2_STREAM_FLAG_NONE,
|
||||
&pri_spec_default,
|
||||
NGHTTP2_STREAM_RESERVED, NULL);
|
||||
CU_ASSERT(0 == nghttp2_submit_headers(session, NGHTTP2_FLAG_NONE, 2, NULL,
|
||||
|
@ -3910,7 +3910,7 @@ void test_nghttp2_submit_settings_update_local_window_size(void) {
|
|||
stream->local_window_size = NGHTTP2_INITIAL_WINDOW_SIZE + 100;
|
||||
stream->recv_window_size = 32768;
|
||||
|
||||
stream = nghttp2_session_open_stream(session, 3, NGHTTP2_STREAM_FLAG_NONE,
|
||||
nghttp2_session_open_stream(session, 3, NGHTTP2_STREAM_FLAG_NONE,
|
||||
&pri_spec_default, NGHTTP2_STREAM_OPENED,
|
||||
NULL);
|
||||
|
||||
|
|
Loading…
Reference in New Issue