From: Alexander Barton Date: Mon, 29 Jan 2018 22:34:40 +0000 (+0100) Subject: Fix compiler warning in ForwardLookup() X-Git-Tag: rel-25-rc1~16 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=commitdiff_plain;h=7ed22d0b22dc1ed624c3931e1cff9e21f4156bd9 Fix compiler warning in ForwardLookup() When compiling without "working getaddrinfo()", the "af" parameter of ForwardLookup() is unused by that function. Mark it as such! This prevents the following compiler warning: resolve.c:235:56: warning: unused parameter ‘af’ [-Wunused-parameter] --- diff --git a/src/ngircd/resolve.c b/src/ngircd/resolve.c index a8a163f0..109d8b6c 100644 --- a/src/ngircd/resolve.c +++ b/src/ngircd/resolve.c @@ -232,7 +232,11 @@ ReverseLookup(const ng_ipaddr_t *IpAddr, char *resbuf, size_t reslen) * @return true if lookup successful, false if domain name not found */ static bool +#ifdef HAVE_WORKING_GETADDRINFO ForwardLookup(const char *hostname, array *IpAddr, int af) +#else +ForwardLookup(const char *hostname, array *IpAddr, UNUSED int af) +#endif { ng_ipaddr_t addr;