From 2a9dfe275d87c78ae8d8b70d88e37fa7c26376da Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Thu, 26 Jun 2025 11:11:18 +0200 Subject: [PATCH] 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 --- lib/http.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/http.c b/lib/http.c index 112911b5f4..482e7abb84 100644 --- a/lib/http.c +++ b/lib/http.c @@ -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) ? -- 2.47.2