]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Fix compiler warning in ForwardLookup()
authorAlexander Barton <alex@barton.de>
Mon, 29 Jan 2018 22:34:40 +0000 (23:34 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 29 Jan 2018 22:34:40 +0000 (23:34 +0100)
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]

src/ngircd/resolve.c

index a8a163f0cf786c73ef34173ed3c3b90059e3fdd5..109d8b6c5491aaa69a3a0f8352b7fbdc3d872c8a 100644 (file)
@@ -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
  * @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)
 ForwardLookup(const char *hostname, array *IpAddr, int af)
+#else
+ForwardLookup(const char *hostname, array *IpAddr, UNUSED int af)
+#endif
 {
        ng_ipaddr_t addr;
 
 {
        ng_ipaddr_t addr;