Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor - P4
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: WT2.9.0
-
Labels:None
Description
David Hows, in wtperf/wtperf_throttle.c, there's this code:
throttle_cfg->ops_count =
|
(uint64_t) (float)(usecs_delta /
|
throttle_cfg->usecs_increment) *
|
(float)throttle_cfg->ops_per_increment;
|
throttle_cfg->last_increment = now;
|
and MSVC complains:
bench\wtperf\wtperf_throttle.c(110): warning C4244: '=': conversion from
|
'float' to 'uint64_t', possible loss of data
|
I'm not sure what's going on here – all of the fields are uint64_t, not sure why we're casting everything to float, couldn't we get the same results using an integer expression?
I suspect the warning would go away if we just cast the result of the calculation to uint64_t, but I don't really understand what's going on here.
Attachments
Issue Links
- is depended on by
-
SERVER-23682 WiredTiger changes for MongoDB 3.2.6
-
- Closed
-