]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http: fix build with cookies and HSTS disabled 17753/head
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Thu, 26 Jun 2025 09:11:18 +0000 (11:11 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Thu, 26 Jun 2025 10:19:16 +0000 (12:19 +0200)
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

index 112911b5f4cb20175efe01bcd95a8fe5d8e06692..482e7abb84d79cf3fc6bfcb64af9b3097a02e216 100644 (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) ?