Skip to content
Snippets Groups Projects
Commit 00a770b3 authored by Kamil Dudka's avatar Kamil Dudka
Browse files

http: silence compile-time warnings without USE_NGHTTP2

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]
parent dd23c495
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment