Fix comparison between signed and unsigned integer compiler warnings

This commit is contained in:
Guillem Jover 2013-05-25 15:36:11 +02:00
parent 30349f8922
commit 7c4caa679a
3 changed files with 4 additions and 3 deletions

View File

@ -135,7 +135,7 @@ heapsort(vbase, nmemb, size, compar)
size_t nmemb, size; size_t nmemb, size;
int (*compar)(const void *, const void *); int (*compar)(const void *, const void *);
{ {
int cnt, i, j, l; size_t cnt, i, j, l;
char tmp, *tmp1, *tmp2; char tmp, *tmp1, *tmp2;
char *base, *k, *p, *t; char *base, *k, *p, *t;

View File

@ -100,7 +100,8 @@ __fdnlist(fd, list)
int fd; int fd;
struct nlist *list; 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++) { for (i = 0; i < sizeof(nlist_fn) / sizeof(nlist_fn[0]); i++) {
n = (nlist_fn[i].fn)(fd, list); n = (nlist_fn[i].fn)(fd, list);

View File

@ -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 at position i, move on to the next
* character. * character.
*/ */
if (nc == 1 && count[bmin] == n) { if (nc == 1 && count[bmin] == (u_int)n) {
push(a, n, i+1); push(a, n, i+1);
nc = count[bmin] = 0; nc = count[bmin] = 0;
continue; continue;