]> granicus.if.org Git - pgbouncer/commitdiff
dnslookup: Fix compiler warnings from unused functions
authorPeter Eisentraut <peter@eisentraut.org>
Wed, 28 Aug 2019 10:00:11 +0000 (12:00 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Wed, 28 Aug 2019 10:00:11 +0000 (12:00 +0200)
.travis.yml
src/dnslookup.c

index e69c00957f8af133939dc1c0e69baee95c06de2f..a5c2167243cc101d7f06525744a8727d4bb0777a 100644 (file)
@@ -32,7 +32,7 @@ env:
     - configure_args='--disable-evdns --without-cares --without-udns'
     - configure_args='--enable-evdns  --without-cares --without-udns'
     - configure_args='--disable-evdns --with-cares    --without-udns --disable-werror'
-    - configure_args='--disable-evdns --without-cares --with-udns    --disable-werror'
+    - configure_args='--disable-evdns --without-cares --with-udns'
     - configure_args='--with-pam'
     - configure_args='--with-openssl'
     - configure_args='--without-openssl'
index 09aa7c7b5d6988f0261171e7486594d06e50d79f..be28273e452c81a78b720f4a0139203cbddb10fa 100644 (file)
@@ -194,6 +194,8 @@ static void freeaddrinfo(struct addrinfo *ai)
        }
 }
 
+#if defined(USE_LIBEVENT1) || defined(USE_UDNS)
+
 static inline struct addrinfo *convert_ipv4_result(const struct in_addr *adrs, int count)
 {
        struct addrinfo *ai, *first = NULL, *last = NULL;
@@ -216,6 +218,10 @@ failed:
        return NULL;
 }
 
+#endif /* USE_LIBEVENT1 || USE_UDNS */
+
+#ifdef USE_CARES
+
 static inline struct addrinfo *convert_hostent(const struct hostent *h)
 {
        struct addrinfo *ai, *first = NULL, *last = NULL;
@@ -238,6 +244,8 @@ failed:
        return NULL;
 }
 
+#endif /* USE_CARES */
+
 #endif /* custom addrinfo */