From 06e0ff366b719f5529d30bc89d75c3a17f084fb1 Mon Sep 17 00:00:00 2001 From: Johannes Schmitt Date: Fri, 19 Feb 2021 13:25:26 +0100 Subject: [PATCH] suppress warning --- include/spdlog/details/os-inl.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index 33f15435..0f6f8e22 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -246,6 +246,13 @@ SPDLOG_INLINE size_t filesize(FILE *f) #endif #endif throw_spdlog_ex("Failed getting file size from fd", errno); + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4702) // disable unreachable code warning under msvc + return 0; // will not be reached. +#pragma warning(pop) // disable unreachable code warning under msvc +#endif // _MSC_VER } // Return utc offset in minutes or throw spdlog_ex on failure