From f2be7851cc34a54154bba57edcaca0eb845de160 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 19 Aug 2014 07:29:30 -0700 Subject: [PATCH] Fix a warning. --- test/printf-test.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/printf-test.cc b/test/printf-test.cc index 4f9167a4..8e840857 100644 --- a/test/printf-test.cc +++ b/test/printf-test.cc @@ -292,12 +292,11 @@ void TestLength(const char *length_spec, U value) { fmt::LongLong signed_value = value; fmt::ULongLong unsigned_value = value; // Apply integer promotion to the argument. - U max = std::numeric_limits::max(); - if (max <= std::numeric_limits::max()) { + fmt::ULongLong max = std::numeric_limits::max(); + if (max <= static_cast(std::numeric_limits::max())) { signed_value = static_cast(value); unsigned_value = static_cast(value); - } else if (static_cast(max) <= - std::numeric_limits::max()) { + } else if (max <= std::numeric_limits::max()) { signed_value = static_cast(value); unsigned_value = static_cast(value); }