diff options
author | Marcel Raad <Marcel.Raad@teamviewer.com> | 2018-08-09 17:19:24 +0200 |
---|---|---|
committer | Marcel Raad <Marcel.Raad@teamviewer.com> | 2018-08-11 19:19:03 +0200 |
commit | 25d2a1bae7871986eabdbe68dc05c5b6473ad4d7 (patch) | |
tree | 5a588c693611fc79f2ff7f3844e3f77ef47ea1c3 /lib/formdata.c | |
parent | 2a278fd73573d025e6d5ebde8b10d446c27d6d3f (diff) | |
download | curl-25d2a1bae7871986eabdbe68dc05c5b6473ad4d7.tar.gz |
Silence GCC 8 cast-function-type warnings
On Windows, casting between unrelated function types is fine and
sometimes even necessary, so just use an intermediate cast to
(void (*) (void)) to silence the warning as described in [0].
[0] https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html
Closes https://github.com/curl/curl/pull/2860
Diffstat (limited to 'lib/formdata.c')
-rw-r--r-- | lib/formdata.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/formdata.c b/lib/formdata.c index 5731da95c..450a0e5d8 100644 --- a/lib/formdata.c +++ b/lib/formdata.c @@ -39,6 +39,7 @@ #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" @@ -878,7 +879,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 |