From e9de8e78f0a73c5fa7e0a7aba6b85f3d8afa76d9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 4 Sep 2013 22:32:57 +0200 Subject: SASL: fix compiler warnings comparison between signed and unsigned integer expressions suggest parentheses around '&&' within '||' (twice) --- lib/curl_sasl.h | 2 +- lib/imap.c | 6 +++--- lib/smtp.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/curl_sasl.h b/lib/curl_sasl.h index 964e94cad..1cac8fd63 100644 --- a/lib/curl_sasl.h +++ b/lib/curl_sasl.h @@ -36,7 +36,7 @@ /* Authentication mechanism values */ #define SASL_AUTH_NONE 0 -#define SASL_AUTH_ANY ~0 +#define SASL_AUTH_ANY ~0U /* This is used to generate a base64 encoded PLAIN authentication message */ CURLcode Curl_sasl_create_plain_message(struct SessionHandle *data, diff --git a/lib/imap.c b/lib/imap.c index 6b6d4ce45..220708785 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -579,9 +579,9 @@ static CURLcode imap_perform_authenticate(struct connectdata *conn) } else #endif - if((imapc->authmechs & SASL_MECH_XOAUTH2) && - (imapc->prefmech & SASL_MECH_XOAUTH2) && - (imapc->prefmech != SASL_AUTH_ANY) || conn->xoauth2_bearer) { + if(((imapc->authmechs & SASL_MECH_XOAUTH2) && + (imapc->prefmech & SASL_MECH_XOAUTH2) && + (imapc->prefmech != SASL_AUTH_ANY)) || conn->xoauth2_bearer) { mech = "XOAUTH2"; state1 = IMAP_AUTHENTICATE_XOAUTH2; state2 = IMAP_AUTHENTICATE_FINAL; diff --git a/lib/smtp.c b/lib/smtp.c index c3650e1d9..7ba2ba464 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -500,9 +500,9 @@ static CURLcode smtp_perform_authenticate(struct connectdata *conn) } else #endif - if((smtpc->authmechs & SASL_MECH_XOAUTH2) && - (smtpc->prefmech & SASL_MECH_XOAUTH2) && - (smtpc->prefmech != SASL_AUTH_ANY) || conn->xoauth2_bearer) { + if(((smtpc->authmechs & SASL_MECH_XOAUTH2) && + (smtpc->prefmech & SASL_MECH_XOAUTH2) && + (smtpc->prefmech != SASL_AUTH_ANY)) || conn->xoauth2_bearer) { mech = "XOAUTH2"; state1 = SMTP_AUTH_XOAUTH2; state2 = SMTP_AUTH_FINAL; -- cgit v1.2.3