From 56d3b9135fa977c3381607ed9afe6a0411678165 Mon Sep 17 00:00:00 2001 From: vitaut Date: Mon, 19 Oct 2015 08:17:05 -0700 Subject: [PATCH] Try a workaround for a bogus Coverity warning --- test/printf-test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/printf-test.cc b/test/printf-test.cc index 041fbad1..67ac052e 100644 --- a/test/printf-test.cc +++ b/test/printf-test.cc @@ -295,7 +295,8 @@ void TestLength(const char *length_spec, U value) { fmt::ULongLong unsigned_value = value; // Apply integer promotion to the argument. fmt::ULongLong max = std::numeric_limits::max(); - if (max <= static_cast(std::numeric_limits::max())) { + using fmt::internal::check; + if (check(max <= static_cast(std::numeric_limits::max()))) { signed_value = static_cast(value); unsigned_value = static_cast(value); } else if (max <= std::numeric_limits::max()) {