Bug #16559
closedIncorrect parameter in call of bloom_filter leads to bad implicit conversion
0%
Description
[ 71%] Building CXX object src/test/common/CMakeFiles/unittest_bloom_filter.dir/test_bloom_filter.cc.o
/usr/srcs/Ceph/work.cmake/ceph/src/test/common/test_bloom_filter.cc:294:28: warning: implicit conversion from 'double' to 'std::size_t' (aka 'unsigned long') changes value
from 0.1 to 0 [-Wliteral-conversion]
bloom_filter bf1(10, .1, .1), bf2;
~~ ^
Updated by Greg Farnum almost 8 years ago
Weird. That's initialized to predicted_inserted_element_count, false_positive_probability, random_seed. Looks like the test is just using a bad init type for the seed.
Updated by Willem Jan Withagen almost 8 years ago
Greg Farnum wrote:
Weird. That's initialized to predicted_inserted_element_count, false_positive_probability, random_seed. Looks like the test is just using a bad init type for the seed.
I would expect so, and the actually value I would pick would be 1.
Like in one of the other calls.
But I have not looked into the code at all.
So that is why I reported it as a bug.
Clang nags about it
Updated by Greg Farnum almost 7 years ago
- Status changed from New to Resolved
This was just wrong and got fixed.