http: fix build with cookies and HSTS disabled

All arguments and local variables in `http_header_s` were unused when
both `CURL_DISABLE_COOKIES` and `CURL_DISABLE_HSTS` were defined.

Closes https://github.com/curl/curl/pull/17753
This commit is contained in:
Marcel Raad 2025-06-26 11:11:18 +02:00
parent f37d5f42f2
commit 2a9dfe275d
No known key found for this signature in database
GPG key ID: 33C416EFAE4D6F02

View file

@ -3310,8 +3310,14 @@ static CURLcode http_header_r(struct Curl_easy *data,
static CURLcode http_header_s(struct Curl_easy *data,
const char *hd, size_t hdlen)
{
#if !defined(CURL_DISABLE_COOKIES) || !defined(CURL_DISABLE_HSTS)
struct connectdata *conn = data->conn;
const char *v;
#else
(void)data;
(void)hd;
(void)hdlen;
#endif
#if !defined(CURL_DISABLE_COOKIES)
v = (data->cookies && data->state.cookie_engine) ?