From: Viktor Szakats Date: Fri, 17 Oct 2025 13:52:15 +0000 (+0200) Subject: setopt: fix unused variable warning in minimal build X-Git-Tag: rc-8_17_0-2~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=14e4d9c3c7fad13611a608fe2f9c4ed4139130e7;p=thirdparty%2Fcurl.git setopt: fix unused variable warning in minimal build Found via: #17961 Closes #19102 --- diff --git a/lib/setopt.c b/lib/setopt.c index 7097c7f7b0..3c3adb06a9 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -870,7 +870,12 @@ static CURLcode value_range(long *value, long below_error, long min, long max) static CURLcode setopt_long(struct Curl_easy *data, CURLoption option, long arg) { +#if !defined(CURL_DISABLE_PROXY) || \ + !defined(CURL_DISABLE_HTTP) || \ + defined(HAVE_GSSAPI) || \ + defined(USE_IPV6) unsigned long uarg = (unsigned long)arg; +#endif bool set = FALSE; CURLcode result = setopt_bool(data, option, arg, &set); struct UserDefined *s = &data->set; @@ -1097,7 +1102,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option, #ifdef HAVE_GSSAPI case CURLOPT_GSSAPI_DELEGATION: - s->gssapi_delegation = (unsigned char)uarg& + s->gssapi_delegation = (unsigned char)uarg & (CURLGSSAPI_DELEGATION_POLICY_FLAG|CURLGSSAPI_DELEGATION_FLAG); break; #endif