From: Sage Weil Date: Fri, 16 Jan 2015 17:02:28 +0000 (-0800) Subject: crush/builder: fix warnings X-Git-Tag: v0.80.9~11^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F3684%2Fhead;p=ceph.git crush/builder: fix warnings 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 (cherry picked from commit 14eb1a73c71d81b7f193fce27c59cb3babf3e74a) --- diff --git a/src/crush/builder.c b/src/crush/builder.c index b139051bd8f..f0815620a10 100644 --- a/src/crush/builder.c +++ b/src/crush/builder.c @@ -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);