mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
formdata.c: Fixed compilation warning
formdata.c:390: warning: cast from pointer to integer of different size
Introduced in commit ca5f9341ef
this happens because a char*, which is
32-bits wide in 32-bit land, is being cast to a curl_off_t which is
64-bits wide where 64-bit integers are supported by the compiler.
This doesn't happen in 64-bit land as a pointer is the same size as a
curl_off_t.
This fix doesn't address the fact that a 64-bit value cannot be used
for CURLFORM_CONTENTLEN when set in a form array and compiled on a
32-bit platforms, it does at least suppress the compilation warning.
This commit is contained in:
parent
9c2cbc104d
commit
7e312bdfdd
@ -387,7 +387,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
|
|||||||
case CURLFORM_CONTENTLEN:
|
case CURLFORM_CONTENTLEN:
|
||||||
current_form->flags |= CURL_HTTPPOST_LARGE;
|
current_form->flags |= CURL_HTTPPOST_LARGE;
|
||||||
current_form->contentslength =
|
current_form->contentslength =
|
||||||
array_state?(curl_off_t)array_value:va_arg(params, curl_off_t);
|
array_state?(curl_off_t)(size_t)array_value:va_arg(params, curl_off_t);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Get contents from a given file name */
|
/* Get contents from a given file name */
|
||||||
|
Loading…
Reference in New Issue
Block a user