diff options
author | delphij <delphij@FreeBSD.org> | 2009-04-02 21:44:55 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2009-04-02 21:44:55 +0000 |
commit | 2ba0aec7c0f07019731495718a0a79cd4b7986c0 (patch) | |
tree | 5ec55f19940e3bdd2b3049a6868d49c901f6f207 | |
parent | 01403c8445145a1a3245e36ac7db5a560da625fb (diff) | |
download | FreeBSD-src-2ba0aec7c0f07019731495718a0a79cd4b7986c0.zip FreeBSD-src-2ba0aec7c0f07019731495718a0a79cd4b7986c0.tar.gz |
Signed/unsigned fixes, should be WARNS=2 clean now.
-rw-r--r-- | usr.bin/locate/locate/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/locate/locate/util.c b/usr.bin/locate/locate/util.c index 944ca88..9cd02b0 100644 --- a/usr.bin/locate/locate/util.c +++ b/usr.bin/locate/locate/util.c @@ -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)); } |