From 755ecb0311af5bdda3c21ac577286ab4c74e88ae Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 13 Oct 2014 08:39:38 -0700 Subject: [PATCH] Fix warnings --- format.cc | 1 + test/posix-test.cc | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/format.cc b/format.cc index 9a7211d0..a2c892a5 100644 --- a/format.cc +++ b/format.cc @@ -268,6 +268,7 @@ class PrecisionHandler : public: unsigned visit_unhandled_arg() { FMT_THROW(fmt::FormatError("precision is not integer")); + return 0; } template diff --git a/test/posix-test.cc b/test/posix-test.cc index 8c4daced..b4ce88e3 100644 --- a/test/posix-test.cc +++ b/test/posix-test.cc @@ -254,7 +254,9 @@ TEST(FileTest, Size) { std::string content = "top secret, destroy before reading"; write_file("test", content); File f("test", File::RDONLY); - EXPECT_EQ(content.size(), f.size()); + EXPECT_GE(f.size(), 0); + fmt::ULongLong file_size = f.size(); + EXPECT_EQ(content.size(), file_size); #ifdef _WIN32 fmt::MemoryWriter message; fmt::internal::format_windows_error(