summaryrefslogtreecommitdiff
path: root/lib/hostip.c
diff options
context:
space:
mode:
authorStewart Gebbie <sgebbie@gethos.net>2022-02-24 13:06:11 +0200
committerDaniel Stenberg <daniel@haxx.se>2022-02-24 14:17:33 +0100
commit8a1fa3b364b9db52cf3e8d843ac1e749890985e6 (patch)
tree2f36558fccac352bcd232de916802df50e08b992 /lib/hostip.c
parent069403703277964a54434af16172a71566cf6fc4 (diff)
downloadcurl-8a1fa3b364b9db52cf3e8d843ac1e749890985e6.tar.gz
hostip: avoid unused parameter error in Curl_resolv_check
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
Diffstat (limited to 'lib/hostip.c')
-rw-r--r--lib/hostip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index 911d5ed6d..9d69bbe35 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -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