Browse Source

formdata: typecast the va_arg return value

To avoid "enumerated type mixed with another type" warnings

Follow-up from 0f52dd5fd5aa3592691a

Closes #9499
Daniel Stenberg 1 year ago
parent
commit
fd840cdead
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/formdata.c

+ 1 - 1
lib/formdata.c

@@ -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;
     }