From 627440191950c2cda518dfdb0482aeb75fc623ad Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 6 Nov 2016 12:29:59 -0800 Subject: [PATCH] Fix warnings --- fmt/printf.h | 8 ++++---- test/format-test.cc | 2 +- test/string-test.cc | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/fmt/printf.h b/fmt/printf.h index 4e2923b6..0e6af603 100644 --- a/fmt/printf.h +++ b/fmt/printf.h @@ -207,8 +207,8 @@ class BasicPrintfArgFormatter : public internal::ArgFormatterBase { specifier information for standard argument types. \endrst */ - BasicPrintfArgFormatter(BasicWriter &writer, FormatSpec &spec) - : internal::ArgFormatterBase(writer, spec) {} + BasicPrintfArgFormatter(BasicWriter &w, FormatSpec &s) + : internal::ArgFormatterBase(w, s) {} /** Formats an argument of type ``bool``. */ void visit_bool(bool value) { @@ -304,8 +304,8 @@ class PrintfFormatter : private internal::FormatterBase { appropriate lifetimes. \endrst */ - explicit PrintfFormatter(const ArgList &args, BasicWriter &w) - : FormatterBase(args), writer_(w) {} + explicit PrintfFormatter(const ArgList &al, BasicWriter &w) + : FormatterBase(al), writer_(w) {} /** Formats stored arguments and writes the output to the writer. */ FMT_API void format(BasicCStringRef format_str); diff --git a/test/format-test.cc b/test/format-test.cc index 5b8e0a0d..856c9331 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -1225,7 +1225,7 @@ TEST(FormatterTest, FormatOct) { TEST(FormatterTest, FormatIntLocale) { ScopedMock mock; - lconv lc = {}; + lconv lc = lconv(); char sep[] = "--"; lc.thousands_sep = sep; EXPECT_CALL(mock, localeconv()).Times(3).WillRepeatedly(testing::Return(&lc)); diff --git a/test/string-test.cc b/test/string-test.cc index f74a5b8a..10e537b7 100644 --- a/test/string-test.cc +++ b/test/string-test.cc @@ -14,8 +14,8 @@ using fmt::internal::StringBuffer; TEST(StringBufferTest, Empty) { StringBuffer buffer; - EXPECT_EQ(0, buffer.size()); - EXPECT_EQ(0, buffer.capacity()); + EXPECT_EQ(0u, buffer.size()); + EXPECT_EQ(0u, buffer.capacity()); std::string data; // std::string may have initial capacity. std::size_t capacity = data.capacity(); @@ -28,7 +28,7 @@ TEST(StringBufferTest, Reserve) { StringBuffer buffer; std::size_t capacity = std::string().capacity() + 10; buffer.reserve(capacity); - EXPECT_EQ(0, buffer.size()); + EXPECT_EQ(0u, buffer.size()); EXPECT_EQ(capacity, buffer.capacity()); std::string data; buffer.move_to(data); @@ -54,8 +54,8 @@ TEST(StringBufferTest, MoveTo) { std::string data; buffer.move_to(data); EXPECT_EQ(p, &data[0]); - EXPECT_EQ(0, buffer.size()); - EXPECT_EQ(0, buffer.capacity()); + EXPECT_EQ(0u, buffer.size()); + EXPECT_EQ(0u, buffer.capacity()); } TEST(StringWriterTest, MoveTo) { @@ -64,7 +64,7 @@ TEST(StringWriterTest, MoveTo) { std::string s; out.move_to(s); EXPECT_EQ("The answer is 42\n", s); - EXPECT_EQ(0, out.size()); + EXPECT_EQ(0u, out.size()); } TEST(StringWriterTest, WString) {