]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/builder: fix warnings 3684/head
authorSage Weil <sage@redhat.com>
Fri, 16 Jan 2015 17:02:28 +0000 (09:02 -0800)
committerSage Weil <sage@redhat.com>
Fri, 13 Feb 2015 16:32:00 +0000 (08:32 -0800)
crush/builder.c: In function 'crush_remove_list_bucket_item':
crush/builder.c:977:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (weight < bucket->h.weight)
             ^
crush/builder.c: In function 'crush_remove_tree_bucket_item':
crush/builder.c:1031:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (weight < bucket->h.weight)
              ^

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 14eb1a73c71d81b7f193fce27c59cb3babf3e74a)

src/crush/builder.c

index b139051bd8fd84ea3c39ea810c724136098762f4..f0815620a10e22805ab3c9b48fbe8c001edecfe1 100644 (file)
@@ -868,7 +868,7 @@ int crush_remove_list_bucket_item(struct crush_bucket_list *bucket, int item)
 {
        unsigned i, j;
        int newsize;
-       int weight;
+       unsigned weight;
 
        for (i = 0; i < bucket->h.size; i++)
                if (bucket->h.items[i] == item)
@@ -920,7 +920,7 @@ int crush_remove_tree_bucket_item(struct crush_bucket_tree *bucket, int item)
 
        for (i = 0; i < bucket->h.size; i++) {
                int node;
-               int weight;
+               unsigned weight;
                int j;
                int depth = calc_depth(bucket->h.size);