From b59b4a2b4563b3ca3cfaaf0cb62273a3d40c8b13 Mon Sep 17 00:00:00 2001 From: gabime Date: Mon, 31 Oct 2022 22:51:41 +0200 Subject: [PATCH] Rvert suppressing msvc2017 warnings and fix ci instead --- appveyor.yml | 8 ++++---- include/spdlog/fmt/fmt.h | 14 ++------------ src/bundled_fmtlib_format.cpp | 12 +----------- 3 files changed, 7 insertions(+), 27 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7d0c8799..705fbc6b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -41,7 +41,7 @@ environment: - GENERATOR: '"Visual Studio 15 2017 Win64"' BUILD_TYPE: Debug BUILD_SHARED: 'OFF' - FATAL_ERRORS: 'ON' + FATAL_ERRORS: 'OFF' WCHAR: 'ON' WCHAR_FILES: 'OFF' BUILD_EXAMPLE: 'ON' @@ -50,7 +50,7 @@ environment: - GENERATOR: '"Visual Studio 15 2017 Win64"' BUILD_TYPE: Release BUILD_SHARED: 'OFF' - FATAL_ERRORS: 'ON' + FATAL_ERRORS: 'OFF' WCHAR: 'OFF' WCHAR_FILES: 'OFF' BUILD_EXAMPLE: 'ON' @@ -59,7 +59,7 @@ environment: - GENERATOR: '"Visual Studio 15 2017 Win64"' BUILD_TYPE: Release BUILD_SHARED: 'ON' - FATAL_ERRORS: 'ON' + FATAL_ERRORS: 'OFF' WCHAR: 'OFF' WCHAR_FILES: 'OFF' BUILD_EXAMPLE: 'ON' @@ -68,7 +68,7 @@ environment: - GENERATOR: '"Visual Studio 15 2017 Win64"' BUILD_TYPE: Release BUILD_SHARED: 'ON' - FATAL_ERRORS: 'ON' + FATAL_ERRORS: 'OFF' WCHAR: 'ON' WCHAR_FILES: 'ON' BUILD_EXAMPLE: 'OFF' diff --git a/include/spdlog/fmt/fmt.h b/include/spdlog/fmt/fmt.h index 73137085..90fcae0f 100644 --- a/include/spdlog/fmt/fmt.h +++ b/include/spdlog/fmt/fmt.h @@ -21,23 +21,13 @@ # endif // enable the 'n' flag in for backward compatibility with fmt 6.x # define FMT_DEPRECATED_N_SPECIFIER - -// enable the ostream formatting for backward compatibility with fmt 8.x +// enable ostream formatting for backward compatibility with fmt 8.x # define FMT_DEPRECATED_OSTREAM -// suppress "integral constant overflow" warning under msvc 2017 (which doesn't appear in other msvc versions) -#if defined(_MSC_VER) && ((_MSC_VER >= 1910) && (_MSC_VER <= 1916)) -# pragma warning(push) -# pragma warning(disable : 4307) -#endif - # include # include + #else // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib # include # include #endif - -#if defined(_MSC_VER) && ((_MSC_VER >= 1910) && (_MSC_VER <= 1916)) -# pragma warning(pop) -#endif diff --git a/src/bundled_fmtlib_format.cpp b/src/bundled_fmtlib_format.cpp index 772a6717..93391826 100644 --- a/src/bundled_fmtlib_format.cpp +++ b/src/bundled_fmtlib_format.cpp @@ -8,17 +8,7 @@ #if !defined(SPDLOG_FMT_EXTERNAL) && !defined(SPDLOG_USE_STD_FORMAT) -// suppress "integral constant overflow" warning under msvc 2017 (which doesn't appear in other msvc versions) -#if defined(_MSC_VER) && ((_MSC_VER >= 1910) && (_MSC_VER <= 1916)) -# pragma warning(push) -# pragma warning(disable : 4307) -#endif -# include - -#if defined(_MSC_VER) && ((_MSC_VER >= 1910) && (_MSC_VER <= 1916)) -# pragma warning(pop) -#endif - +#include FMT_BEGIN_NAMESPACE namespace detail {