svn commit: r190657 - head/usr.bin/locate/locate
Xin LI
delphij at FreeBSD.org
Thu Apr 2 14:44:56 PDT 2009
Author: delphij
Date: Thu Apr 2 21:44:55 2009
New Revision: 190657
URL: http://svn.freebsd.org/changeset/base/190657
Log:
Signed/unsigned fixes, should be WARNS=2 clean now.
Modified:
head/usr.bin/locate/locate/util.c
Modified: head/usr.bin/locate/locate/util.c
==============================================================================
--- head/usr.bin/locate/locate/util.c Thu Apr 2 21:23:04 2009 (r190656)
+++ head/usr.bin/locate/locate/util.c Thu Apr 2 21:44:55 2009 (r190657)
@@ -237,7 +237,7 @@ getwm(p)
} u;
register int i;
- for (i = 0; i < INTSIZE; i++)
+ for (i = 0; i < (int)INTSIZE; i++)
u.buf[i] = *p++;
i = u.i;
@@ -245,7 +245,7 @@ getwm(p)
if (i > MAXPATHLEN || i < -(MAXPATHLEN)) {
i = ntohl(i);
if (i > MAXPATHLEN || i < -(MAXPATHLEN))
- errx(1, "integer out of +-MAXPATHLEN (%d): %d",
+ errx(1, "integer out of +-MAXPATHLEN (%d): %u",
MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i));
}
return(i);
@@ -270,7 +270,7 @@ getwf(fp)
if (word > MAXPATHLEN || word < -(MAXPATHLEN)) {
word = ntohl(word);
if (word > MAXPATHLEN || word < -(MAXPATHLEN))
- errx(1, "integer out of +-MAXPATHLEN (%d): %d",
+ errx(1, "integer out of +-MAXPATHLEN (%d): %u",
MAXPATHLEN, abs(word) < abs(htonl(word)) ? word :
htonl(word));
}
More information about the svn-src-head
mailing list