mirror of
https://github.com/curl/curl.git
synced 2026-04-12 00:11:42 +08:00
To fix potential `-Wdisabled-macro-expansion` warnings when using these
macros within other macros. Fixing for example:
```
lib/doh.c:328:3: error: disabled expansion of recursive macro [clang-diagnostic-disabled-macro-expansion,-warnings-as-errors]
328 | ERROR_CHECK_SETOPT(CURLOPT_URL, url);
| ^
lib/doh.c:271:14: note: expanded from macro 'ERROR_CHECK_SETOPT'
271 | result = curl_easy_setopt((CURL *)doh, x, y); \
| ^
include/curl/curl.h:3332:44: note: expanded from macro 'curl_easy_setopt'
3332 | #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)
| ^
[...]
```
Also update comments on why curl continues to disable
`-Wdisabled-macro-expansion` and `-Wused-but-marked-unused` warnings.
Follow-up to
|
||
|---|---|---|
| .. | ||
| curl.h | ||
| curlver.h | ||
| easy.h | ||
| header.h | ||
| Makefile.am | ||
| mprintf.h | ||
| multi.h | ||
| options.h | ||
| stdcheaders.h | ||
| system.h | ||
| typecheck-gcc.h | ||
| urlapi.h | ||
| websockets.h | ||