From 6a497e1d061993cce54c2d71506a90155a3725e6 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 19 Jul 2019 06:18:46 +0200 Subject: [PATCH] Fix warnings --- include/fmt/safe-duration-cast.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/fmt/safe-duration-cast.h b/include/fmt/safe-duration-cast.h index db2a340b..25302f79 100644 --- a/include/fmt/safe-duration-cast.h +++ b/include/fmt/safe-duration-cast.h @@ -258,13 +258,15 @@ To safe_duration_cast(std::chrono::duration from, // multiply with Factor::num without overflow or underflow if (Factor::num != 1) { constexpr auto max1 = - std::numeric_limits::max() / Factor::num; + std::numeric_limits::max() / + static_cast(Factor::num); if (count > max1) { ec = 1; return {}; } constexpr auto min1 = - std::numeric_limits::lowest() / Factor::num; + std::numeric_limits::lowest() / + static_cast(Factor::num); if (count < min1) { ec = 1; return {};