From 90a12b1bb22b28eaf5dc2ed5e664234f7b332ead Mon Sep 17 00:00:00 2001 From: vitaut Date: Tue, 12 May 2015 08:57:21 -0700 Subject: [PATCH] Fix warnings --- test/format-test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/format-test.cc b/test/format-test.cc index 4f6fc5fe..cb1279ad 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -994,7 +994,7 @@ TEST(FormatterTest, RuntimePrecision) { FormatError, "number is too big"); EXPECT_THROW_MSG(format("{0:.{1}}", 0, -1l), FormatError, "negative precision"); - if (sizeof(long) > sizeof(int)) { + if (fmt::internal::check(sizeof(long) > sizeof(int))) { long value = INT_MAX; EXPECT_THROW_MSG(format("{0:.{1}}", 0, (value + 1)), FormatError, "number is too big"); @@ -1050,7 +1050,7 @@ void check_unknown_types( char format_str[BUFFER_SIZE], message[BUFFER_SIZE]; const char *special = ".0123456789}"; for (int i = CHAR_MIN; i <= CHAR_MAX; ++i) { - char c = i; + char c = static_cast(i); if (std::strchr(types, c) || std::strchr(special, c) || !c) continue; safe_sprintf(format_str, "{0:10%c}", c); if (std::isprint(static_cast(c)))