]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
hostip: suppress compiler warning
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Mon, 9 Dec 2019 12:48:24 +0000 (13:48 +0100)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Fri, 13 Dec 2019 19:55:51 +0000 (20:55 +0100)
With `--disable-doh --disable-threaded-resolver`, the `dns` parameter
is not used.

Closes https://github.com/curl/curl/pull/4692

lib/hostip.c

index d4e8f9366a73500f39d9e26a7ed5c54a31e3a512..b434b390a29dc6867afa9e0f12022cecbfce9ff5 100644 (file)
@@ -1021,6 +1021,10 @@ CURLcode Curl_loadhostpairs(struct Curl_easy *data)
 CURLcode Curl_resolv_check(struct connectdata *conn,
                            struct Curl_dns_entry **dns)
 {
+#if defined(CURL_DISABLE_DOH) && !defined(CURLRES_ASYNCH)
+  (void)dns;
+#endif
+
   if(conn->data->set.doh)
     return Curl_doh_is_resolved(conn, dns);
   return Curl_resolver_is_resolved(conn, dns);