1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

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]
This commit is contained in:
Kamil Dudka 2015-05-19 12:51:40 +02:00
parent dd23c49546
commit 00a770b3f5

View File

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