Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Apr 2009 21:44:55 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r190657 - head/usr.bin/locate/locate
Message-ID:  <200904022144.n32LitaM076840@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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));
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904022144.n32LitaM076840>