summaryrefslogtreecommitdiff
path: root/lib/c-hyper.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-12-20 18:33:54 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-12-20 23:06:46 +0100
commite1a4647a42b901d88f9629ce98ff56960e342a74 (patch)
treebe99a0b589f9a1c7f1e81bd6290c13f9b2711417 /lib/c-hyper.c
parent6e2392f1772e940b66746732b7b4223630483949 (diff)
downloadcurl-e1a4647a42b901d88f9629ce98ff56960e342a74.tar.gz
c-hyper: fix compiler warnings
Identified by clang on windows. Reported-by: Gisle Vanem Bug: 58974d25d8173aec154e593ed9d866da566c9811 Closes #6351
Diffstat (limited to 'lib/c-hyper.c')
-rw-r--r--lib/c-hyper.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/c-hyper.c b/lib/c-hyper.c
index e7b01f9d7..c7995d9f1 100644
--- a/lib/c-hyper.c
+++ b/lib/c-hyper.c
@@ -525,7 +525,8 @@ static int uploadpostfields(void *userdata, hyper_context *ctx,
*chunk = NULL; /* nothing more to deliver */
else {
/* send everything off in a single go */
- *chunk = hyper_buf_copy(data->set.postfields, data->req.p.http->postsize);
+ *chunk = hyper_buf_copy(data->set.postfields,
+ (size_t)data->req.p.http->postsize);
data->req.upload_done = TRUE;
}
return HYPER_POLL_READY;
@@ -561,7 +562,7 @@ static CURLcode bodysend(struct Curl_easy *data,
hyper_request *hyperreq,
Curl_HttpReq httpreq)
{
- CURLcode result;
+ CURLcode result = CURLE_OK;
struct dynbuf req;
if((httpreq == HTTPREQ_GET) || (httpreq == HTTPREQ_HEAD))
Curl_pgrsSetUploadSize(data, 0); /* no request body */
@@ -819,11 +820,9 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
if(result)
return result;
- if((httpreq != HTTPREQ_GET) && (httpreq != HTTPREQ_HEAD)) {
- result = bodysend(data, conn, headers, req, httpreq);
- if(result)
- return result;
- }
+ result = bodysend(data, conn, headers, req, httpreq);
+ if(result)
+ return result;
Curl_debug(data, CURLINFO_HEADER_OUT, (char *)"\r\n", 2);