benchmark icon indicating copy to clipboard operation
benchmark copied to clipboard

Some small warnings in MSVC

Open riccozzz opened this issue 5 years ago • 1 comments

Getting the following warnings when building with the latest VS2019 RC (Version 19.20.27404).

benchmark_runner.cc(258): warning C4244: 'initializing': conversion from 'double' to 'size_t', possible loss of data
benchmark_runner.cc(258): warning C4244: 'initializing': conversion from 'double' to 'const size_t', possible loss of data
check.h(41) : warning C4722: 'benchmark::internal::CheckHandler::~CheckHandler': destructor never returns, potential memory leak

The first is a simple fix, but not sure about C4722 - should that warning be disabled (or just ignored)?

riccozzz avatar Mar 19 '19 16:03 riccozzz

Completely missed this one: The former should be fixed with a static_cast, the third is a valid warning but as it's the CheckHandler it's ignorable. I think we should probably pragma that off, but given it's in a header maybe we just disabled the warning globally.

dmah42 avatar May 08 '21 08:05 dmah42