Fix dummy warnings

This commit is contained in:
Victor Zverovich 2018-11-25 15:33:28 -08:00
parent fecb2d6f0d
commit 645c76a9a5

View File

@ -56,11 +56,10 @@ inline std::tm localtime(std::time_t time) {
#endif
};
dispatcher lt(time);
if (lt.run())
return lt.tm_;
// Too big time values may be unsupported.
if (!lt.run())
FMT_THROW(format_error("time_t value out of range"));
return {};
return lt.tm_;
}
// Thread-safe replacement for std::gmtime
@ -94,11 +93,10 @@ inline std::tm gmtime(std::time_t time) {
#endif
};
dispatcher gt(time);
if (gt.run())
return gt.tm_;
// Too big time values may be unsupported.
if (!gt.run())
FMT_THROW(format_error("time_t value out of range"));
return {};
return gt.tm_;
}
namespace internal {