From 674999c5279843e35e4f96b6ce41d740e8f9ce9c Mon Sep 17 00:00:00 2001 From: Steven Hoving Date: Sun, 30 Sep 2018 14:49:39 +0200 Subject: [PATCH] fix vs2017 warning fmt::v5::localtime 'not all control paths return a value'. --- include/fmt/time.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/fmt/time.h b/include/fmt/time.h index a624058f..b0756011 100644 --- a/include/fmt/time.h +++ b/include/fmt/time.h @@ -58,6 +58,7 @@ inline std::tm localtime(std::time_t time) { return lt.tm_; // Too big time values may be unsupported. FMT_THROW(format_error("time_t value out of range")); + return {}; } // Thread-safe replacement for std::gmtime @@ -93,6 +94,7 @@ inline std::tm gmtime(std::time_t time) { return gt.tm_; // Too big time values may be unsupported. FMT_THROW(format_error("time_t value out of range")); + return {}; } namespace internal {