From 19db831c415e9b60f7ef0bc6d28ecf761e847d6f Mon Sep 17 00:00:00 2001 From: Ricardo Mones Date: Sat, 5 May 2018 21:59:55 +0200 Subject: [PATCH] Fix a couple of unused variable warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit - libspamc.c:491:19: warning: variable ‘family’ set but not used (used in a #ifdef block, fix by surrounding by same #ifdef) - libspamc.c:1911:35: warning: unused variable ‘addrp’ (used in a commented code block, fix by commenting also declaration) --- src/plugins/spamassassin/libspamc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/spamassassin/libspamc.c b/src/plugins/spamassassin/libspamc.c index 623c1ab33..09e52b05c 100644 --- a/src/plugins/spamassassin/libspamc.c +++ b/src/plugins/spamassassin/libspamc.c @@ -488,6 +488,7 @@ static int _try_to_connect_tcp(const struct transport *tp, int *sockptr) #ifdef SPAMC_HAS_ADDRINFO res = tp->hosts[hostix]; while(res) { +#ifdef DO_CONNECT_DEBUG_SYSLOGS char *family = NULL; switch(res->ai_family) { case AF_INET: @@ -500,6 +501,7 @@ static int _try_to_connect_tcp(const struct transport *tp, int *sockptr) family = "Unknown"; break; } +#endif if ((ret = _opensocket(tp->flags, res, &mysock)) != EX_OK) { res = res->ai_next; @@ -1908,7 +1910,7 @@ static void _randomize_hosts(struct transport *tp) int transport_setup(struct transport *tp, int flags) { #ifdef SPAMC_HAS_ADDRINFO - struct addrinfo hints, *res, *addrp; + struct addrinfo hints, *res; /* , *addrp; */ char port[6]; int origerr; #else -- 2.25.1