summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMAntoniak <[email protected]>2023-12-08 01:07:38 +0100
committerDaniel Stenberg <[email protected]>2023-12-08 09:28:53 +0100
commit13a1d1ace82bf5999bed8e2382c6ebaae40f5953 (patch)
tree7b1ca54c19f9e7bbc3a973d7fd000282abaf04c6
parentede2e812c22fd42527acffdbafd98ee90eaa0dbe (diff)
sendf: fix compiler warning with CURL_DISABLE_HEADERS_API
fix MSVC warning C4189: 'htype': local variable is initialized but not referenced - when CURL_DISABLE_HEADERS_API is defined. Closes #12485
-rw-r--r--lib/sendf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sendf.c b/lib/sendf.c
index a2fac0c4e9..1bdab91653 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -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) ) {