From 43107463df8bebefbfa8eb4b24c2ba3829ace0cc Mon Sep 17 00:00:00 2001 From: Ivan Shynkarenka Date: Mon, 8 Apr 2019 20:45:16 +0300 Subject: [PATCH] Visual Studio: Fix C4702: unreachable code in pedantic mode --- include/fmt/format.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/fmt/format.h b/include/fmt/format.h index ee6ec500..4b208e97 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -57,6 +57,11 @@ # define FMT_CUDA_VERSION 0 #endif +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable: 4702) // C4702: unreachable code +#endif + #include "core.h" #if FMT_GCC_VERSION >= 406 || FMT_CLANG_VERSION @@ -3723,4 +3728,8 @@ FMT_END_NAMESPACE # pragma GCC diagnostic pop #endif +#if defined(_MSC_VER) +#pragma warning(pop) +#endif + #endif // FMT_FORMAT_H_