From: Marcel Raad Date: Thu, 26 Jun 2025 09:11:18 +0000 (+0200) Subject: http: fix build with cookies and HSTS disabled X-Git-Tag: curl-8_15_0~144 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F17753%2Fhead;p=thirdparty%2Fcurl.git 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 --- 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) ?