]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
setopt: fix unused variable warning in minimal build
authorViktor Szakats <commit@vsz.me>
Fri, 17 Oct 2025 13:52:15 +0000 (15:52 +0200)
committerViktor Szakats <commit@vsz.me>
Fri, 17 Oct 2025 14:19:42 +0000 (16:19 +0200)
Found via: #17961

Closes #19102

lib/setopt.c

index 7097c7f7b0150acc561739627445ec0b636ad219..3c3adb06a9cb5d6c17666f4920a5d869c032475e 100644 (file)
@@ -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