]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
hostip: avoid unused parameter error in Curl_resolv_check
authorStewart Gebbie <sgebbie@gethos.net>
Thu, 24 Feb 2022 11:06:11 +0000 (13:06 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 24 Feb 2022 13:17:33 +0000 (14:17 +0100)
When built without DNS-over-HTTP and without asynchronous resolvers,
neither the dns nor the data parameters are used.

That is Curl_resolv_check appears to call
Curl_resolver_is_resolved(data, dns). But,
with CURL_DISABLE_DOH without CURLRES_ASYNCH, the call is actually
elided via a macro definition.

This fix resolves the resultant: "unused parameter 'data'" error.

Closes #8505

lib/hostip.c

index 911d5ed6d379b1b8c4d928e306ea203a2760c19c..9d69bbe3591c942e12701c26fc839603e8bd87fb 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -1220,6 +1220,7 @@ CURLcode Curl_resolv_check(struct Curl_easy *data,
                            struct Curl_dns_entry **dns)
 {
 #if defined(CURL_DISABLE_DOH) && !defined(CURLRES_ASYNCH)
+  (void)data;
   (void)dns;
 #endif
 #ifndef CURL_DISABLE_DOH