]> granicus.if.org Git - curl/commitdiff
examples/post-callback: use long for CURLOPT_POSTFIELDSIZE
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Thu, 21 Sep 2017 18:07:24 +0000 (20:07 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Thu, 21 Sep 2017 18:07:24 +0000 (20:07 +0200)
Otherwise, typecheck-gcc.h warns on MinGW-w64.

docs/examples/post-callback.c

index 4dbe18e24f96d55457e80c74ac869dc9f164791c..ebb4e2a25c8403bce6db8ba77f33733f3b489071 100644 (file)
@@ -117,7 +117,7 @@ int main(void)
 #else
     /* Set the expected POST size. If you want to POST large amounts of data,
        consider CURLOPT_POSTFIELDSIZE_LARGE */
-    curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, wt.sizeleft);
+    curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)wt.sizeleft);
 #endif
 
 #ifdef DISABLE_EXPECT