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

@ -26,7 +26,7 @@ curl_easy_header - get an HTTP header
CURLHcode curl_easy_header(CURL *easy,
const char *name,
size_t index,
size_t nameindex,
unsigned int origin,
int request,
struct curl_header **hout);
@ -38,10 +38,10 @@ curl_easy_header(3) returns a pointer to a "curl_header" struct in **hout**
with data for the HTTP response header *name*. The case insensitive
null-terminated header name should be specified without colon.
*index* 0 means asking for the first instance of the header. If the returned
header struct has **amount** set larger than 1, it means there are more
instances of the same header name available to get. Asking for a too big index
makes **CURLHE_BADINDEX** get returned.
*nameindex* 0 means asking for the first instance of the header. If the
returned header struct has **amount** set larger than 1, it means there are
more instances of the same header name available to get. Asking for a too big
index makes **CURLHE_BADINDEX** get returned.
The *origin* argument is for specifying which headers to receive, as a single
HTTP transfer might provide headers from several different places and they may

View file

@ -21,7 +21,7 @@ curl_easy_pause - pause and unpause a connection
~~~c
#include <curl/curl.h>
CURLcode curl_easy_pause(CURL *handle, int bitmask);
CURLcode curl_easy_pause(CURL *handle, int action);
~~~
# DESCRIPTION
@ -54,7 +54,7 @@ A paused transfer is excluded from low speed cancels via the
CURLOPT_LOW_SPEED_LIMIT(3) option and unpausing a transfer resets the
time period required for the low speed limit to be met.
The **bitmask** argument is a set of bits that sets the new state of the
The **action** argument is a set of bits that sets the new state of the
connection. The following bits can be used:
## CURLPAUSE_RECV

View file

@ -37,7 +37,7 @@ curl_multi_socket_action(3) function with the **sockfd** argument set
to CURL_SOCKET_TIMEOUT, or call curl_multi_perform(3) if you are using
the simpler and older multi interface approach.
The timeout value returned in the long **timeout** points to, is in number
The timeout value returned in the long **timeout_ms** points to, is in number
of milliseconds at this moment. If 0, it means you should proceed immediately
without waiting for anything. If it returns -1, there is no timeout at all set.