]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
sendf: fix compiler warning with CURL_DISABLE_HEADERS_API
authorMAntoniak <47522782+MAntoniak@users.noreply.github.com>
Fri, 8 Dec 2023 00:07:38 +0000 (01:07 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 8 Dec 2023 08:28:53 +0000 (09:28 +0100)
fix MSVC warning C4189: 'htype': local variable is initialized but not
referenced - when CURL_DISABLE_HEADERS_API is defined.

Closes #12485

lib/sendf.c

index a2fac0c4e90a53d053af0c663eed42f13536ac84..1bdab916532156ca8405078b7e65646b95b648e7 100644 (file)
@@ -345,7 +345,7 @@ static CURLcode chop_write(struct Curl_easy *data,
     len -= chunklen;
   }
 
-#ifndef CURL_DISABLE_HTTP
+#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_HEADERS_API)
   /* HTTP header, but not status-line */
   if((conn->handler->protocol & PROTO_FAMILY_HTTP) &&
      (type & CLIENTWRITE_HEADER) && !(type & CLIENTWRITE_STATUS) ) {