Project

General

Profile

Actions

Bug #15363

closed

Clang reports strange conversion double to size_t

Added by Willem Jan Withagen about 8 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

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;
~~ ^
looking at common/bloom_filter.hpp the third variable needs to be integer (size_t)
So this is probably a typo, and Clang sets it to exactly the unexpected value.

Actions #1

Updated by Greg Farnum almost 7 years ago

  • Status changed from New to Resolved

That line is now

bloom_filter bf1(10, .1, 1), bf2;

Actions

Also available in: Atom PDF