]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
Fix comparison between signed and unsigned integer compiler warnings
authorGuillem Jover <guillem@hadrons.org>
Sat, 25 May 2013 13:36:11 +0000 (15:36 +0200)
committerGuillem Jover <guillem@hadrons.org>
Mon, 27 May 2013 02:05:17 +0000 (04:05 +0200)
src/heapsort.c
src/nlist.c
src/radixsort.c

index 2479cb0dc88442fd61776292240e466f09b24b8a..7e345c7fa88e2120b74ee773e0d2a6138a4c7cf5 100644 (file)
@@ -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;
 
index 7f9ed96720b6db146585b4dc3102ec3ec05ef4e9..6c9be5196b8156a2270db018a3ffe633c3fbd7b6 100644 (file)
@@ -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);
index 45e24773740a03a8b170a3b9116ae18e9c102d48..b9746fc161127bae8ea35fa40b0b3490537f4713 100644 (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.
                 */
-               if (nc == 1 && count[bmin] == n) {
+               if (nc == 1 && count[bmin] == (u_int)n) {
                        push(a, n, i+1);
                        nc = count[bmin] = 0;
                        continue;