Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning: 'CURLformoption' is promoted to 'int' when passed through '...' #9484

Closed
wants to merge 1 commit into from

Conversation

xiaoxiang781216
Copy link
Contributor

curl/lib/formdata.c: In function 'FormAdd':
curl/lib/formdata.c:249:31: warning: 'CURLformoption' is promoted to 'int' when passed through '...'
  249 |       option = va_arg(params, CURLformoption);
      |                               ^
curl/lib/formdata.c:249:31: note: (so you should pass 'int' not 'CURLformoption' to 'va_arg')
curl/lib/formdata.c:249:31: note: if this code is reached, the program will abort

…h '...'

curl/lib/formdata.c: In function 'FormAdd':
curl/lib/formdata.c:249:31: warning: 'CURLformoption' is promoted to 'int' when passed through '...'
  249 |       option = va_arg(params, CURLformoption);
      |                               ^
curl/lib/formdata.c:249:31: note: (so you should pass 'int' not 'CURLformoption' to 'va_arg')
curl/lib/formdata.c:249:31: note: if this code is reached, the program will abort

Change-Id: I01c4a662d614646e50996ff9de03718909d89e37
@bagder
Copy link
Member

bagder commented Sep 12, 2022

What compiler/option did you use to get this warning?

@bagder bagder added the build label Sep 12, 2022
@xiaoxiang781216
Copy link
Contributor Author

xiaoxiang781216 commented Sep 12, 2022

verion:

arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10.3-2021.10) 10.3.1 20210824 (release)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

command line:

arm-none-eabi-gcc -c -fno-common -Wall -Wstrict-prototypes -Wshadow -Wundef -nostdlib -pipe -Os -fno-strict-aliasing -fomit-frame-pointer -ffunction-sections -fdata-sections -g -march=armv8-m.main+dsp -mtune=cortex-m33 -mthumb -mfpu=fpv5-sp-d16 -mfloat-abi=hard -isystem "/home/xiaoxiang/vela/nuttx/include" -D__NuttX__ -Wno-cpp -I "/home/xiaoxiang/vela/apps/system/libuv/libuv/include" -I "/home/xiaoxiang/vela/apps/system/libuv/ext/include" -I "/home/xiaoxiang/vela/apps/system/uorb/" -I "/home/xiaoxiang/vela/apps/external/mbedtls/mbedtls/include" -I "/home/xiaoxiang/vela/apps/external/tinycrypt/tinycrypt/lib/include" -I "/home/xiaoxiang/vela/apps/external/curl/curl/include" -I "/home/xiaoxiang/vela/apps/external/libxml2/libxml2/include" -I "/home/xiaoxiang/vela/apps/../nuttx/include" -I "/home/xiaoxiang/vela/apps/../nuttx/drivers/wireless/ieee80211/bes2300wp" -I "/home/xiaoxiang/vela/apps/../nuttx/include" -I "/home/xiaoxiang/vela/apps/../external/zblue/subsys/bluetooth/shell" -I "/home/xiaoxiang/vela/apps/../external/zblue/subsys/bluetooth/host" -I "/home/xiaoxiang/vela/apps/../nuttx/include" -I "/home/xiaoxiang/vela/apps/frameworks/topics/include/" -I "/home/xiaoxiang/vela/apps/frameworks/kvdb/include" -I "/home/xiaoxiang/vela/apps/frameworks/media/include" -I "/home/xiaoxiang/vela/apps/include" -DHAVE_CONFIG_H -I "." -I "/home/xiaoxiang/vela/apps/external/zlib/zlib" -Dconfig_init=curl_config_init -Dstr2num=curl_str2num -I "curl/lib"   curl/lib/formdata.c -o  curl/lib/formdata.c.home.xiaoxiang.vela.external.curl.o

@bagder
Copy link
Member

bagder commented Sep 13, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants