]> granicus.if.org Git - curl/commitdiff
doh: fix curl_easy_setopt argument type
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Tue, 2 Oct 2018 09:15:29 +0000 (11:15 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Tue, 2 Oct 2018 09:15:29 +0000 (11:15 +0200)
CURLOPT_POSTFIELDSIZE is long. Fixes a compiler warning on 64-bit
MinGW.

lib/doh.c

index 988f352180fce6b0e3ecac62057959afacdde646..03e28beae0d870b391759055007f0ef9a7f91584 100644 (file)
--- a/lib/doh.c
+++ b/lib/doh.c
@@ -229,7 +229,7 @@ static CURLcode dohprobe(struct Curl_easy *data,
     ERROR_CHECK_SETOPT(CURLOPT_WRITEDATA, resp);
     if(!data->set.doh_get) {
       ERROR_CHECK_SETOPT(CURLOPT_POSTFIELDS, p->dohbuffer);
-      ERROR_CHECK_SETOPT(CURLOPT_POSTFIELDSIZE, p->dohlen);
+      ERROR_CHECK_SETOPT(CURLOPT_POSTFIELDSIZE, (long)p->dohlen);
     }
     ERROR_CHECK_SETOPT(CURLOPT_HTTPHEADER, headers);
     ERROR_CHECK_SETOPT(CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);