formdata: typecast the va_arg return value

To avoid "enumerated type mixed with another type" warnings

Follow-up from 0f52dd5fd5

Closes #9499
This commit is contained in:
Daniel Stenberg 2022-09-13 14:52:33 +02:00
parent 3bbe75095f
commit fd840cdead
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -254,7 +254,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
/* 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);
option = (CURLformoption)va_arg(params, int);
if(CURLFORM_END == option)
break;
}