mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
curl/curl.h: replace recursive macros with C++-friendly method to enforce 3 args
Certain uses may still trigger a C compiler warning `-Wdisabled-macro-expansion` after this, e.g. when the call is wrapped in the `CURL_IGNORE_DEPRECATION()` macro as seen in docs/examples. Suggested-by: Kai Pastor Ref: https://github.com/curl/curl/issues/20682#issuecomment-3949788664 Follow-up toee9b000438#20686 Follow-up todaa6b27b4d#20597 Closes #20709
This commit is contained in:
parent
c3c2bf5941
commit
f45bf74b5a
3 changed files with 12 additions and 10 deletions
|
|
@ -869,7 +869,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
if test "$compiler_num" -ge "301"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [format-non-iso])
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-covered-switch-default" # Annoying to fix or silence
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-disabled-macro-expansion" # Triggered by curl/curl.h, standard headers
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-disabled-macro-expansion" # Triggered by standard headers, and curl/curl.h (in rare combinations)
|
||||
fi
|
||||
#
|
||||
dnl Only clang 3.2 or later
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue