summaryrefslogtreecommitdiff
path: root/lib/formdata.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/formdata.c')
-rw-r--r--lib/formdata.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/formdata.c b/lib/formdata.c
index f5ed3653d..3128f495b 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -251,8 +251,10 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
}
}
else {
- /* This is not array-state, get next option */
- option = va_arg(params, CURLformoption);
+ /* This is not array-state, get next option. This gets an 'int' with
+ va_arg() because CURLformoption might be a smaller type than int and
+ might cause compiler warnings and wrong behavior. */
+ option = va_arg(params, int);
if(CURLFORM_END == option)
break;
}