]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
formdata: typecast the va_arg return value
authorDaniel Stenberg <daniel@haxx.se>
Tue, 13 Sep 2022 12:52:33 +0000 (14:52 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 13 Sep 2022 13:38:48 +0000 (15:38 +0200)
To avoid "enumerated type mixed with another type" warnings

Follow-up from 0f52dd5fd5aa3592691a

Closes #9499

lib/formdata.c

index 3128f495b1b702c6a4673bc1ec1562e270da0945..46542b4329df4459a7e94db9551e3630b9a7cc53 100644 (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;
     }