Module: ngircd.git Branch: master Commit: 92fba63ad88e0a3260c75468fb3407fae7074dc6 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=92fba...
Author: Alexander Barton alex@barton.de Date: Tue Dec 25 18:49:28 2012 +0100
Add a cast in ForwardLookup() to fix a gcc warning on Cygwin
This fixes the following warning message of 4.5.3 on Cygwin:
resolve.c: In function ‘ForwardLookup’: resolve.c:273:21: warning: comparison between signed and unsigned integer expressions
---
src/ngircd/resolve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ngircd/resolve.c b/src/ngircd/resolve.c index c7e6003..3f99b3a 100644 --- a/src/ngircd/resolve.c +++ b/src/ngircd/resolve.c @@ -270,7 +270,7 @@ ForwardLookup(const char *hostname, array *IpAddr, int af) for (a = ai_results; a != NULL; a = a->ai_next) { assert(a->ai_addrlen <= sizeof(addr));
- if (a->ai_addrlen > sizeof(addr)) + if ((size_t)a->ai_addrlen > sizeof(addr)) continue;
memcpy(&addr, a->ai_addr, a->ai_addrlen);
ngircd-commits@lists.barton.de