clang-tidy: enable more checks, fix fallouts

- enable three checks:
  - bugprone-invalid-enum-default-initialization
  - bugprone-sizeof-expression
  - readability-inconsistent-declaration-parameter-name (strict)
- fix remaining discrepancies with arg names in prototypes
  and implementation, in strict mode.
- document reason for some checks tested but not enabled.

Closes #20794
This commit is contained in:
Viktor Szakats 2026-03-03 01:58:29 +01:00
parent e0dd6eb4a4
commit df6014894b
No known key found for this signature in database
34 changed files with 222 additions and 209 deletions

View file

@ -2901,21 +2901,21 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
*/
#undef curl_easy_setopt
CURLcode curl_easy_setopt(CURL *d, CURLoption tag, ...)
CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...)
{
va_list arg;
CURLcode result;
struct Curl_easy *data = d;
struct Curl_easy *data = curl;
if(!data)
return CURLE_BAD_FUNCTION_ARGUMENT;
va_start(arg, tag);
va_start(arg, option);
result = Curl_vsetopt(data, tag, arg);
result = Curl_vsetopt(data, option, arg);
va_end(arg);
if(result == CURLE_BAD_FUNCTION_ARGUMENT)
failf(data, "setopt 0x%x got bad argument", tag);
failf(data, "setopt 0x%x got bad argument", option);
return result;
}