cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH 2/3] pop3: Make POP3_TYPE_ANY unsigned to fix warning

From: Melissa Mears <myriachan_at_cox.net>
Date: Tue, 3 Dec 2013 15:56:39 -0800

POP3_TYPE_ANY, or ~0, is written to pop3c->preftype in lib/pop3c.c, an
unsigned int variable. The result of ~0 is -1, which caused a warning
due to writing a negative number to an unsigned variable. To fix this,
make the expression ~0U so that its value is considered the unsigned
number UINT_MAX. This is what SASL_AUTH_ANY did in curl_sasl.h.

---
 lib/pop3.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/pop3.h b/lib/pop3.h
index 1964d72..fcc8395 100644
--- a/lib/pop3.h
+++ b/lib/pop3.h
@@ -93,7 +93,7 @@ extern const struct Curl_handler Curl_handler_pop3s;
 
 /* Authentication type values */
 #define POP3_TYPE_NONE      0
-#define POP3_TYPE_ANY       ~0
+#define POP3_TYPE_ANY       ~0U
 
 /* This is the 5-bytes End-Of-Body marker for POP3 */
 #define POP3_EOB "\x0d\x0a\x2e\x0d\x0a"
-- 
1.7.1
------=_Part_7185602_2084823767.1386116568140
Content-Type: application/octet-stream; 
	name=0003-darwinssl-Fix-if-10.6.0-for-SecKeychainSearch.patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; 
	filename=0003-darwinssl-Fix-if-10.6.0-for-SecKeychainSearch.patch
Received on 2001-09-17