From: Michael Poole Date: Sat, 31 Mar 2007 16:11:28 +0000 (-0400) Subject: Add typecast to avoid a warning from some buggy Gentoo version of gcc. X-Git-Tag: v1.4.0-rc1~37 X-Git-Url: http://git.pk910.de/?p=srvx.git;a=commitdiff_plain;h=8acabe2fc9601fbbf0357ef5626ed8907d6ef42b Add typecast to avoid a warning from some buggy Gentoo version of gcc. src/mod-blacklist.c (do_expandos): Typecast an expression that is supposed to have type size_t (which is unsigned) to unsigned. --- diff --git a/src/mod-blacklist.c b/src/mod-blacklist.c index 7ae9526..c2d1e5e 100644 --- a/src/mod-blacklist.c +++ b/src/mod-blacklist.c @@ -68,7 +68,7 @@ do_expandos(char *output, unsigned int out_len, const char *input, ...) dlen = strlen(datum); for (found = output; (found = strstr(output, key)) != NULL; found += dlen) { rlen = strlen(found + klen); - if ((dlen > klen) && (found + dlen + rlen - output > out_len)) + if ((dlen > klen) && ((unsigned)(found + dlen + rlen - output) > out_len)) rlen = output + out_len - found - dlen; memmove(found + dlen, found + klen, rlen); memcpy(found, datum, dlen + 1);