From: MAntoniak <47522782+MAntoniak@users.noreply.github.com> Date: Fri, 8 Dec 2023 00:07:38 +0000 (+0100) Subject: sendf: fix compiler warning with CURL_DISABLE_HEADERS_API X-Git-Tag: curl-8_6_0~242 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=13a1d1ace82bf5999bed8e2382c6ebaae40f5953;p=thirdparty%2Fcurl.git 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 --- 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) ) {