summaryrefslogtreecommitdiffstats
path: root/lib/formdata.c
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@lists.haxx.se>2022-10-26 06:12:46 (GMT)
committerBrad King <brad.king@kitware.com>2022-10-31 20:11:01 (GMT)
commitec122fff08ab9a8e56fb90126ecedb99c759011b (patch)
tree372b5f86f3fad307de965e11187e51ef0860960b /lib/formdata.c
parent9d8f81f4f8ac4a234ced9c446958fdfcaed4faa3 (diff)
downloadCMake-ec122fff08ab9a8e56fb90126ecedb99c759011b.zip
CMake-ec122fff08ab9a8e56fb90126ecedb99c759011b.tar.gz
CMake-ec122fff08ab9a8e56fb90126ecedb99c759011b.tar.bz2
curl 2022-10-26 (cd95ee9f)
Code extracted from: https://github.com/curl/curl.git at commit cd95ee9f771361acf241629d2fe5507e308082a2 (curl-7_86_0).
Diffstat (limited to 'lib/formdata.c')
-rw-r--r--lib/formdata.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/formdata.c b/lib/formdata.c
index 5fefd7a..46542b4 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -18,6 +18,8 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
+ * SPDX-License-Identifier: curl
+ *
***************************************************************************/
#include "curl_setup.h"
@@ -249,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 = (CURLformoption)va_arg(params, int);
if(CURLFORM_END == option)
break;
}