Commit 7c4caa679a5065d1a34608c583c479a6e66a37e3

Guillem Jover 2013-05-25T15:36:11

Fix comparison between signed and unsigned integer compiler warnings

diff --git a/src/heapsort.c b/src/heapsort.c
index 2479cb0..7e345c7 100644
--- a/src/heapsort.c
+++ b/src/heapsort.c
@@ -135,7 +135,7 @@ heapsort(vbase, nmemb, size, compar)
 	size_t nmemb, size;
 	int (*compar)(const void *, const void *);
 {
-	int cnt, i, j, l;
+	size_t cnt, i, j, l;
 	char tmp, *tmp1, *tmp2;
 	char *base, *k, *p, *t;
 
diff --git a/src/nlist.c b/src/nlist.c
index 7f9ed96..6c9be51 100644
--- a/src/nlist.c
+++ b/src/nlist.c
@@ -100,7 +100,8 @@ __fdnlist(fd, list)
 	int fd;
 	struct nlist *list;
 {
-	int n = -1, i;
+	size_t i;
+	int n = -1;
 
 	for (i = 0; i < sizeof(nlist_fn) / sizeof(nlist_fn[0]); i++) {
 		n = (nlist_fn[i].fn)(fd, list);
diff --git a/src/radixsort.c b/src/radixsort.c
index 45e2477..b9746fc 100644
--- a/src/radixsort.c
+++ b/src/radixsort.c
@@ -175,7 +175,7 @@ r_sort_a(const u_char **a, int n, int i, const u_char *tr, u_int endch)
 		 * character at position i, move on to the next
 		 * character.
 		 */
-		if (nc == 1 && count[bmin] == n) {
+		if (nc == 1 && count[bmin] == (u_int)n) {
 			push(a, n, i+1);
 			nc = count[bmin] = 0;
 			continue;