mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
clang-tidy: check misc-header-include-cycle, fix in internal headers
Also opt-out `curl/curl.h` because it includes `curl/mprintf.h`, which in turn includes `curl/curl.h` for `CURL_EXTERN`. Not changeable in public headers to remain compatible. (Somehow only triggered for examples.) Ref: https://clang.llvm.org/extra/clang-tidy/checks/misc/header-include-cycle.html Closes #20645
This commit is contained in:
parent
947775a613
commit
977ac0c06c
@ -12,8 +12,12 @@ Checks:
|
||||
- -clang-diagnostic-nullability-extension
|
||||
- bugprone-suspicious-realloc-usage
|
||||
- misc-const-correctness
|
||||
- misc-header-include-cycle
|
||||
- portability-*
|
||||
- readability-named-parameter
|
||||
- readability-redundant-control-flow
|
||||
- readability-redundant-preprocessor
|
||||
- readability-uppercase-literal-suffix
|
||||
|
||||
CheckOptions:
|
||||
misc-header-include-cycle.IgnoredFilesList: 'curl/curl.h;openssl/ssl.h'
|
||||
|
||||
@ -23,8 +23,6 @@
|
||||
* SPDX-License-Identifier: curl
|
||||
*
|
||||
***************************************************************************/
|
||||
#include "curl_setup.h"
|
||||
|
||||
/* defaults:
|
||||
|
||||
ssize_t recv(int, void *, size_t, int);
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
#include "tool_cb_hdr.h"
|
||||
#include "tool_cb_prg.h"
|
||||
#include "tool_sdecls.h"
|
||||
#include "tool_cfgable.h"
|
||||
|
||||
struct per_transfer {
|
||||
/* double linked */
|
||||
|
||||
@ -128,10 +128,4 @@ typedef enum {
|
||||
SANITIZE_ERR_LAST /* never use! */
|
||||
} SANITIZEcode;
|
||||
|
||||
/*
|
||||
* Complete struct declarations which have OperationConfig struct members,
|
||||
* just in case this header is directly included in some source file.
|
||||
*/
|
||||
#include "tool_cfgable.h"
|
||||
|
||||
#endif /* HEADER_CURL_TOOL_SDECLS_H */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user