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 | ||
| Makefile.am | ||
| README.md | ||
include
Public include files for libcurl, external users.
They are all placed in the curl subdirectory here for better fit in any kind of environment. You must include files from here using...
#include <curl/curl.h>
... style and point the compiler's include path to the directory holding the curl subdirectory. It makes it more likely to survive future modifications.
The public curl include files can be shared freely between different platforms and different architectures.