Fix warnings

This commit is contained in:
Victor Zverovich 2016-11-06 12:29:59 -08:00
parent 2fa4655af6
commit 6274401919
3 changed files with 11 additions and 11 deletions

View File

@ -207,8 +207,8 @@ class BasicPrintfArgFormatter : public internal::ArgFormatterBase<Impl, Char> {
specifier information for standard argument types.
\endrst
*/
BasicPrintfArgFormatter(BasicWriter<Char> &writer, FormatSpec &spec)
: internal::ArgFormatterBase<Impl, Char>(writer, spec) {}
BasicPrintfArgFormatter(BasicWriter<Char> &w, FormatSpec &s)
: internal::ArgFormatterBase<Impl, Char>(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<Char> &w)
: FormatterBase(args), writer_(w) {}
explicit PrintfFormatter(const ArgList &al, BasicWriter<Char> &w)
: FormatterBase(al), writer_(w) {}
/** Formats stored arguments and writes the output to the writer. */
FMT_API void format(BasicCStringRef<Char> format_str);

View File

@ -1225,7 +1225,7 @@ TEST(FormatterTest, FormatOct) {
TEST(FormatterTest, FormatIntLocale) {
ScopedMock<LocaleMock> mock;
lconv lc = {};
lconv lc = lconv();
char sep[] = "--";
lc.thousands_sep = sep;
EXPECT_CALL(mock, localeconv()).Times(3).WillRepeatedly(testing::Return(&lc));

View File

@ -14,8 +14,8 @@ using fmt::internal::StringBuffer;
TEST(StringBufferTest, Empty) {
StringBuffer<char> 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<char> 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) {