Skip to content

Commit

Permalink
http: silence compile-time warnings without USE_NGHTTP2
Browse files Browse the repository at this point in the history
Error: CLANG_WARNING:
lib/http.c:173:16: warning: Value stored to 'http' during its initialization is never read

Error: COMPILER_WARNING:
lib/http.c: scope_hint: In function ‘http_disconnect’
lib/http.c:173:16: warning: unused variable ‘http’ [-Wunused-variable]
  • Loading branch information
kdudka committed May 19, 2015
1 parent dd23c49 commit 00a770b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/http.c
Expand Up @@ -170,14 +170,16 @@ CURLcode Curl_http_setup_conn(struct connectdata *conn)

static CURLcode http_disconnect(struct connectdata *conn, bool dead_connection)
{
struct HTTP *http = conn->data->req.protop;
(void)dead_connection;
#ifdef USE_NGHTTP2
struct HTTP *http = conn->data->req.protop;
if(http) {
Curl_add_buffer_free(http->header_recvbuf);
http->header_recvbuf = NULL; /* clear the pointer */
}
#else
(void)conn;
#endif
(void)dead_connection;
return CURLE_OK;
}

Expand Down

0 comments on commit 00a770b

Please sign in to comment.