aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib650.c
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2018-07-09 18:43:55 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2018-08-21 18:53:45 +0200
commit60776a0515c2a8f572902ad5bcc9f63eeaeafa84 (patch)
tree79eb46200916b3c1c4df98fca8c2cb79d2c87acc /tests/libtest/lib650.c
parentd5c0351055d5709da8f3e16c91348092fdb481aa (diff)
curl-compilers: enable -Wbad-function-cast on GCC
This warning used to be enabled only for clang as it's a bit stricter on GCC. Silence the remaining occurrences and enable it on GCC too. Closes https://github.com/curl/curl/pull/2747
Diffstat (limited to 'tests/libtest/lib650.c')
-rw-r--r--tests/libtest/lib650.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/libtest/lib650.c b/tests/libtest/lib650.c
index 056270cfb..79d60b624 100644
--- a/tests/libtest/lib650.c
+++ b/tests/libtest/lib650.c
@@ -62,6 +62,7 @@ int test(char *URL)
struct curl_forms formarray[3];
size_t formlength = 0;
char flbuf[32];
+ long contentlength = 0;
if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
@@ -94,11 +95,13 @@ int test(char *URL)
goto test_cleanup;
}
+ contentlength = (long)(strlen(data) - 1);
+
/* Use a form array for the non-copy test. */
formarray[0].option = CURLFORM_PTRCONTENTS;
formarray[0].value = data;
formarray[1].option = CURLFORM_CONTENTSLENGTH;
- formarray[1].value = (char *) strlen(data) - 1;
+ formarray[1].value = (char *)(size_t)contentlength;
formarray[2].option = CURLFORM_END;
formarray[2].value = NULL;
formrc = curl_formadd(&formpost,