From 314cc2b7c5640f2685a119a90bb92f1e41e6c618 Mon Sep 17 00:00:00 2001 From: David Levine Date: Mon, 27 Feb 2012 20:56:58 -0600 Subject: [PATCH] Added cast in conditional to prevent signed/unsigned comparison, and wrapped argument to prevent warning about unused argument when built without SASL support. --- mts/smtp/smtp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mts/smtp/smtp.c b/mts/smtp/smtp.c index 620dabc..97dd398 100644 --- a/mts/smtp/smtp.c +++ b/mts/smtp/smtp.c @@ -200,6 +200,7 @@ smtp_init (char *client, char *server, char *port, int watch, int verbose, char *server_mechs; #else /* CYRUS_SASL */ NMH_UNUSED (sasl); + NMH_UNUSED (saslssf); NMH_UNUSED (saslmech); NMH_UNUSED (user); #endif /* CYRUS_SASL */ @@ -956,7 +957,8 @@ sm_auth_sasl(char *user, int saslssf, char *mechlist, char *inhost) memset(&secprops, 0, sizeof(secprops)); secprops.maxbufsize = SASL_MAXRECVBUF; - secprops.max_ssf = tls_active ? 0 : (saslssf != -1 ? saslssf : UINT_MAX); + secprops.max_ssf = + tls_active ? 0 : (saslssf != -1 ? (unsigned int) saslssf : UINT_MAX); result = sasl_setprop(conn, SASL_SEC_PROPS, &secprops); -- 1.7.10.4