mirror of
https://github.com/curl/curl.git
synced 2026-07-27 08:27:19 +03:00
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:
parent
e0dd6eb4a4
commit
df6014894b
34 changed files with 222 additions and 209 deletions
10
lib/setopt.c
10
lib/setopt.c
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue