ldout(cct, 5) << "insert_item adding " << cur << " weight " << weight
<< " to bucket " << id << dendl;
- int r = bucket_add_item(b, cur, 0);
- assert (!r);
+ [[maybe_unused]] int r = bucket_add_item(b, cur, 0);
+ ceph_assert(!r);
break;
}
struct crush_choose_arg *arg = (struct crush_choose_arg *)space;
struct crush_weight_set *weight_set = (struct crush_weight_set *)(arg + map->max_buckets);
__u32 *weights = (__u32 *)(weight_set + bucket_count * num_positions);
- char *weight_set_ends = (char*)weights;
+ char *weight_set_ends __attribute__((unused)) = (char*)weights;
__s32 *ids = (__s32 *)(weights + sum_bucket_size * num_positions);
- char *weights_end = (char *)ids;
- char *ids_end = (char *)(ids + sum_bucket_size);
+ char *weights_end __attribute__((unused)) = (char *)ids;
+ char *ids_end __attribute__((unused)) = (char *)(ids + sum_bucket_size);
BUG_ON(space + size != ids_end);
for (b = 0; b < map->max_buckets; b++) {
if (map->buckets[b] == 0) {