From fb12cfd1966a27224bafac2dfddd13ded1e53de0 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 17 Dec 2014 06:53:32 -0800 Subject: [PATCH] Suppress more bogus warnings --- test/format-test.cc | 3 ++- test/posix-test.cc | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/format-test.cc b/test/format-test.cc index a07dcbe0..a6f41602 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -212,7 +212,8 @@ TEST(WriterTest, Allocator) { typedef AllocatorRef TestAllocator; MockAllocator alloc; fmt::BasicMemoryWriter w((TestAllocator(&alloc))); - std::size_t size = 1.5 * fmt::internal::INLINE_BUFFER_SIZE; + std::size_t size = + static_cast(1.5 * fmt::internal::INLINE_BUFFER_SIZE); std::vector mem(size); EXPECT_CALL(alloc, allocate(size)).WillOnce(testing::Return(&mem[0])); for (int i = 0; i < fmt::internal::INLINE_BUFFER_SIZE + 1; ++i) diff --git a/test/posix-test.cc b/test/posix-test.cc index 75e6af32..c9529688 100644 --- a/test/posix-test.cc +++ b/test/posix-test.cc @@ -25,6 +25,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +// Disable bogus MSVC warnings. +#define _CRT_SECURE_NO_WARNINGS + #include "posix-test.h" #include @@ -32,7 +35,6 @@ #include #ifdef _WIN32 -# define _CRT_SECURE_NO_WARNINGS # include # undef max # undef ERROR