From c684886dfcf26e0143b92891af2c84cd4cef727e Mon Sep 17 00:00:00 2001 From: vitaut Date: Tue, 20 Oct 2015 08:29:41 -0700 Subject: [PATCH] Make coverity happy --- test/printf-test.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/printf-test.cc b/test/printf-test.cc index c44a7708..9bb9a62e 100644 --- a/test/printf-test.cc +++ b/test/printf-test.cc @@ -336,12 +336,13 @@ void TestLength(const char *length_spec) { TestLength(length_spec, -42); TestLength(length_spec, min); TestLength(length_spec, max); - if (min >= 0 || static_cast(min) > - std::numeric_limits::min()) { + using fmt::internal::check; + if (check(min >= 0 || static_cast(min) > + std::numeric_limits::min())) { TestLength(length_spec, fmt::LongLong(min) - 1); } fmt::ULongLong long_long_max = std::numeric_limits::max(); - if (max < 0 || static_cast(max) < long_long_max) + if (check(max < 0 || static_cast(max) < long_long_max)) TestLength(length_spec, fmt::LongLong(max) + 1); TestLength(length_spec, std::numeric_limits::min()); TestLength(length_spec, std::numeric_limits::max());