commit 19db831c415e9b60f7ef0bc6d28ecf761e847d6f
parent 436f7434bd3cd4a07b0e02f969f7ff344f134509
Author: Ricardo Mones <ricardo@mones.org>
Date: Sat, 5 May 2018 21:59:55 +0200
Fix a couple of unused variable warnings
- 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)
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git 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