Commit Diff
- Commit:
92fba63ad88e0a3260c75468fb3407fae7074dc6
- From:
- Alexander Barton <alex@barton.de>
- Date:
- Message:
- 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
- Actions:
- Patch | Tree
--- src/ngircd/resolve.c +++ src/ngircd/resolve.c @@ -270,7 +270,7 @@ ForwardLookup(const char *hostname, array *IpAddr, int 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);