summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/formdata.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-23 14:19:57 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-10-23 14:20:56 (GMT)
commit5112a76a175f9be8faf55d64f520977ba5d838b6 (patch)
treebf576c76add72d215aabdcf4cec690e4f064af53 /Utilities/cmcurl/lib/formdata.c
parent887ba2dc5ff2668542f43a1fb2d8a6e7cc2ef105 (diff)
parent031002456381245f88f64b0826798b1e249e8e39 (diff)
downloadCMake-5112a76a175f9be8faf55d64f520977ba5d838b6.zip
CMake-5112a76a175f9be8faf55d64f520977ba5d838b6.tar.gz
CMake-5112a76a175f9be8faf55d64f520977ba5d838b6.tar.bz2
Merge topic 'update-curl'
0310024563 curl: Update build within CMake to account for 7.61 changes b9d1107790 curl: Backport to work with CMake 3.1 again e9e8dcee6b Merge branch 'upstream-curl' into update-curl 18812a9c3d curl 2018-09-04 (432eb5f5) ded211ae46 curl: Update script to get curl 7.61.1 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2509
Diffstat (limited to 'Utilities/cmcurl/lib/formdata.c')
-rw-r--r--Utilities/cmcurl/lib/formdata.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/Utilities/cmcurl/lib/formdata.c b/Utilities/cmcurl/lib/formdata.c
index f912410..202d930 100644
--- a/Utilities/cmcurl/lib/formdata.c
+++ b/Utilities/cmcurl/lib/formdata.c
@@ -39,16 +39,13 @@
#include "sendf.h"
#include "strdup.h"
#include "rand.h"
+#include "warnless.h"
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
-/* What kind of Content-Type to use on un-specified files with unrecognized
- extensions. */
-#define HTTPPOST_CONTENTTYPE_DEFAULT "application/octet-stream"
-
#define HTTPPOST_PTRNAME CURL_HTTPPOST_PTRNAME
#define HTTPPOST_FILENAME CURL_HTTPPOST_FILENAME
#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
@@ -305,7 +302,8 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
* Set the contents property.
*/
case CURLFORM_PTRCONTENTS:
- current_form->flags |= HTTPPOST_PTRCONTENTS; /* fall through */
+ current_form->flags |= HTTPPOST_PTRCONTENTS;
+ /* FALLTHROUGH */
case CURLFORM_COPYCONTENTS:
if(current_form->value)
return_value = CURL_FORMADD_OPTION_TWICE;
@@ -725,7 +723,7 @@ int curl_formget(struct curl_httppost *form, void *arg,
while(!result) {
char buffer[8192];
- size_t nread = Curl_mime_read(buffer, 1, sizeof buffer, &toppart);
+ size_t nread = Curl_mime_read(buffer, 1, sizeof(buffer), &toppart);
if(!nread)
break;
@@ -812,7 +810,6 @@ CURLcode Curl_getformdata(struct Curl_easy *data,
{
CURLcode result = CURLE_OK;
curl_mime *form = NULL;
- curl_mime *multipart;
curl_mimepart *part;
struct curl_httppost *file;
@@ -831,7 +828,7 @@ CURLcode Curl_getformdata(struct Curl_easy *data,
/* Process each top part. */
for(; !result && post; post = post->next) {
/* If we have more than a file here, create a mime subpart and fill it. */
- multipart = form;
+ curl_mime *multipart = form;
if(post->more) {
part = curl_mime_addpart(form);
if(!part)
@@ -883,7 +880,8 @@ CURLcode Curl_getformdata(struct Curl_easy *data,
compatibility: use of "-" pseudo file name should be avoided. */
result = curl_mime_data_cb(part, (curl_off_t) -1,
(curl_read_callback) fread,
- (curl_seek_callback) fseek,
+ CURLX_FUNCTION_CAST(curl_seek_callback,
+ fseek),
NULL, (void *) stdin);
}
else