clang-tidy: check bugprone-macro-parentheses, fix fallouts

Also:
- lib/parsedate: avoid relying on side-effect of missing parentheses.
- lib/http: drop redundant parentheses.
- fix cases in headers missed by clang-tidy.

Ref: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/macro-parentheses.html

Closes #20647
This commit is contained in:
Viktor Szakats 2026-02-20 14:20:53 +01:00
parent 9ce9afa312
commit 139307865a
No known key found for this signature in database
36 changed files with 163 additions and 156 deletions

View file

@ -155,7 +155,7 @@ static void hash_elem_link(struct Curl_hash *h,
++h->size;
}
#define CURL_HASH_SLOT(x, y, z) x->table[x->hash_func(y, z, x->slots)]
#define CURL_HASH_SLOT(x, y, z) x->table[(x)->hash_func(y, z, (x)->slots)]
#define CURL_HASH_SLOT_ADDR(x, y, z) &CURL_HASH_SLOT(x, y, z)
void *Curl_hash_add2(struct Curl_hash *h, void *key, size_t key_len, void *p,