mirror of
https://github.com/curl/curl.git
synced 2026-05-30 06:47:28 +03:00
clang-tidy: enable clang-analyzer-* checks explicitly, fix fallout
v22.1.0 disabled them by default. Fix fallout: - http: check NULL to silence false positives in `HD_VAL()`. Ref: https://releases.llvm.org/22.1.0/tools/clang/tools/extra/docs/ReleaseNotes.html#improvements-to-clang-tidy Follow-up toda6fbb12a6#20779 Follow-up toce4db9c2ef#20751 Closes #20778
This commit is contained in:
parent
da6fbb12a6
commit
7a77884a66
2 changed files with 2 additions and 1 deletions
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
# https://clang.llvm.org/extra/clang-tidy/checks/list.html
|
||||
Checks:
|
||||
- clang-analyzer-*
|
||||
- -clang-analyzer-optin.performance.Padding
|
||||
- -clang-analyzer-security.ArrayBound # due to false positives with clang-tidy v21.1.0
|
||||
- -clang-analyzer-security.insecureAPI.bzero # for FD_ZERO() (seen on macOS)
|
||||
|
|
|
|||
|
|
@ -3185,7 +3185,7 @@ static statusline checkprotoprefix(struct Curl_easy *data,
|
|||
(((hdlen) >= (sizeof(n) - 1)) && curl_strnequal(n, hd, sizeof(n) - 1))
|
||||
|
||||
#define HD_VAL(hd, hdlen, n) \
|
||||
((((hdlen) >= (sizeof(n) - 1)) && \
|
||||
((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
|
||||
curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
|
||||
|
||||
/* HTTP header has field name `n` (a string constant) and contains `v`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue