diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-02-07 10:40:27 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-02-11 11:57:02 +0100 |
commit | 982c09b95b618b1609a9f4aa00abe89f6806c023 (patch) | |
tree | 66d76e721a4fac0f19de0c48605e5beea97c2dc2 | |
parent | b49652ac66cc004d36a4aa03fc8a2cd5b37eae95 (diff) |
multi: (void)-prefix when ignoring return values
... and added braces to two function calls which fixes warnings if they
are replace by empty macros at build-time.
-rw-r--r-- | lib/multi.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/multi.c b/lib/multi.c index 0b1383579..6b891620f 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -1934,13 +1934,15 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, k = &data->req; - if(!(k->keepon & KEEP_RECV)) + if(!(k->keepon & KEEP_RECV)) { /* We're done receiving */ Curl_pipeline_leave_read(data->conn); + } - if(!(k->keepon & KEEP_SEND)) + if(!(k->keepon & KEEP_SEND)) { /* We're done sending */ Curl_pipeline_leave_write(data->conn); + } if(done || (result == CURLE_RECV_ERROR)) { /* If CURLE_RECV_ERROR happens early enough, we assume it was a race @@ -2299,8 +2301,9 @@ CURLMcode curl_multi_cleanup(struct Curl_multi *multi) Curl_psl_destroy(&multi->psl); /* Free the blacklists by setting them to NULL */ - Curl_pipeline_set_site_blacklist(NULL, &multi->pipelining_site_bl); - Curl_pipeline_set_server_blacklist(NULL, &multi->pipelining_server_bl); + (void)Curl_pipeline_set_site_blacklist(NULL, &multi->pipelining_site_bl); + (void)Curl_pipeline_set_server_blacklist(NULL, + &multi->pipelining_server_bl); free(multi); |