From b668566fd8148414b8074f096b85b22c42ed3af9 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 16 Jan 2015 09:02:28 -0800 Subject: [PATCH] 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) --- src/crush/builder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crush/builder.c b/src/crush/builder.c index b139051bd8fd..f0815620a10e 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); -- 2.47.3