{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/rocksdb/issues/1979","repository_url":"https://api.github.com/repos/facebook/rocksdb","labels_url":"https://api.github.com/repos/facebook/rocksdb/issues/1979/labels{/name}","comments_url":"https://api.github.com/repos/facebook/rocksdb/issues/1979/comments","events_url":"https://api.github.com/repos/facebook/rocksdb/issues/1979/events","html_url":"https://github.com/facebook/rocksdb/issues/1979","id":213251353,"number":1979,"title":"RocksDB failed to build (Release|x64) on windows due to warning C4244: '=': conversion from 'uint64_t' to 'double', possible loss of data","user":{"login":"KarenHuang2016","id":20896121,"avatar_url":"https://avatars3.githubusercontent.com/u/20896121?v=3","gravatar_id":"","url":"https://api.github.com/users/KarenHuang2016","html_url":"https://github.com/KarenHuang2016","followers_url":"https://api.github.com/users/KarenHuang2016/followers","following_url":"https://api.github.com/users/KarenHuang2016/following{/other_user}","gists_url":"https://api.github.com/users/KarenHuang2016/gists{/gist_id}","starred_url":"https://api.github.com/users/KarenHuang2016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KarenHuang2016/subscriptions","organizations_url":"https://api.github.com/users/KarenHuang2016/orgs","repos_url":"https://api.github.com/users/KarenHuang2016/repos","events_url":"https://api.github.com/users/KarenHuang2016/events{/privacy}","received_events_url":"https://api.github.com/users/KarenHuang2016/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-10T05:52:56Z","updated_at":"2017-03-10T05:52:56Z","closed_at":null,"body":"Hi,\r\nWe (the MSVC++ team) do a nightly build of the latest boost sources as a compiler \"Real World Code\" test. We noticed warning C4244 is reported after commit 5b11124 \"add max to histogram stats\". This warning is reported form file histogram.cc like below:\r\nd:\\rocksdb\\src\\util\\histogram.cc(238): warning C4244: '=': conversion from 'uint64_t' to 'double', possible loss of data \r\n\r\n//histogram.cc\r\nvoid HistogramStat::Data(HistogramData * const data) const {\r\n  assert(data);\r\n  data->median = Median();\r\n  data->percentile95 = Percentile(95);\r\n  data->percentile99 = Percentile(99);\r\n  **data->max = max();**\r\n  data->average = Average();\r\n  data->standard_deviation = StandardDeviation();\r\n}\r\n\r\nThe \"data->max\" is doulbe and the return value of \"max()\" is uint64_t. So the warning C4244 is reported.\r\n\r\nCould you please take a look at this? Thanks!"}}
{"actor":{"display_login":"KarenHuang2016"}}