From: Peter Eisentraut Date: Wed, 28 Aug 2019 10:00:11 +0000 (+0200) Subject: dnslookup: Fix compiler warnings from unused functions X-Git-Tag: pgbouncer_1_12_0~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e0c384fab435dca72ae124819c0c17994aedb489;p=pgbouncer dnslookup: Fix compiler warnings from unused functions --- diff --git a/.travis.yml b/.travis.yml index e69c009..a5c2167 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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' diff --git a/src/dnslookup.c b/src/dnslookup.c index 09aa7c7..be28273 100644 --- a/src/dnslookup.c +++ b/src/dnslookup.c @@ -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 */