mirror of
https://github.com/ceph/ceph
synced 2024-12-19 09:57:05 +00:00
Merge pull request #15173 from joscollin/wip-test-crush-warning
test/crush: silence warnings from -Walloc-size-larger-than= and -Wstringop-overflow=
This commit is contained in:
commit
8348a13fbd
@ -1054,8 +1054,10 @@ TEST(CrushWrapper, choose_args_compat) {
|
||||
crush_weight_set weight_set;
|
||||
weight_set.size = 1;
|
||||
weight_set.weights = &weights;
|
||||
crush_choose_arg choose_args[c.get_max_buckets()];
|
||||
memset(choose_args, '\0', sizeof(crush_choose_arg) * c.get_max_buckets());
|
||||
int maxbuckets = c.get_max_buckets();
|
||||
assert(maxbuckets > 0);
|
||||
crush_choose_arg choose_args[maxbuckets];
|
||||
memset(choose_args, '\0', sizeof(crush_choose_arg) * maxbuckets);
|
||||
choose_args[-1-id].ids_size = 0;
|
||||
choose_args[-1-id].weight_set_size = 1;
|
||||
choose_args[-1-id].weight_set = &weight_set;
|
||||
|
Loading…
Reference in New Issue
Block a user