clang-tidy: sync argument names in prototype and definition

Discovered with clang-tidy checker
`readability-inconsistent-declaration-parameter-name`.

Also:
- do not enforce the above because of inconsistencies still present
  between public API prototypes and definitions. (Also betwen man page
  protos, and man page examples, and other parts of the code, e.g.
  `easy` vs `curl` vs `d` vs `handle`) Perhaps subject for a future
  effort:
  https://github.com/curl/curl/actions/runs/22166472728/job/64094691653
- enable and fix `readability-named-parameter` where missing.

Refs:
https://clang.llvm.org/extra/clang-tidy/checks/readability/inconsistent-declaration-parameter-name.html
https://clang.llvm.org/extra/clang-tidy/checks/readability/named-parameter.html

Closes #20624
This commit is contained in:
Viktor Szakats 2026-02-18 00:55:27 +01:00
parent 7c01bb23bc
commit c878160e9c
No known key found for this signature in database
64 changed files with 200 additions and 195 deletions

View file

@ -111,15 +111,18 @@ struct connectdata;
bool Curl_secure_context(struct connectdata *conn, const char *host);
CURLcode Curl_cookie_add(struct Curl_easy *data,
struct CookieInfo *c, bool header,
bool noexpiry, const char *lineptr,
const char *domain, const char *path,
struct CookieInfo *ci,
bool httpheader,
bool noexpire,
const char *lineptr,
const char *domain,
const char *path,
bool secure) WARN_UNUSED_RESULT;
CURLcode Curl_cookie_getlist(struct Curl_easy *data, struct connectdata *conn,
bool *okay, const char *host,
struct Curl_llist *list) WARN_UNUSED_RESULT;
void Curl_cookie_clearall(struct CookieInfo *cookies);
void Curl_cookie_clearsess(struct CookieInfo *cookies);
void Curl_cookie_clearall(struct CookieInfo *ci);
void Curl_cookie_clearsess(struct CookieInfo *ci);
#if defined(CURL_DISABLE_HTTP) || defined(CURL_DISABLE_COOKIES)
#define Curl_cookie_list(x) NULL
@ -130,7 +133,7 @@ void Curl_cookie_clearsess(struct CookieInfo *cookies);
#define Curl_flush_cookies(x, y) Curl_nop_stmt
#else
void Curl_flush_cookies(struct Curl_easy *data, bool cleanup);
void Curl_cookie_cleanup(struct CookieInfo *c);
void Curl_cookie_cleanup(struct CookieInfo *ci);
struct CookieInfo *Curl_cookie_init(void);
struct curl_slist *Curl_cookie_list(struct Curl_easy *data);
CURLcode Curl_cookie_loadfiles(struct Curl_easy *data) WARN_UNUSED_RESULT;