From 9dcf127fa5ba833c273cb18c8dd2d01cf4289cb0 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 30 Nov 2018 13:47:04 -0800 Subject: [PATCH] Workaround a bogus MSVC warning --- include/fmt/format-inl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index e1cd4d3c..71f0840b 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -136,12 +136,14 @@ int safe_strerror( ERANGE : result; } +#if !FMT_MSC_VER // Fallback to strerror if strerror_r and strerror_s are not available. int fallback(internal::null<>) { errno = 0; buffer_ = strerror(error_code_); return errno; } +#endif public: dispatcher(int err_code, char *&buf, std::size_t buf_size)