Moving pragma for MSVC warning C4505 from pybind11.h to existing list in detail/common.h (#3160)

* Moving pragma for C4505 from pybind11.h to existing list in detail/common.h.

* Removing 4 existing suppressions to 1. see what is still needed and 2. capture the MSVC messages.

* It turns out none of the 4 pragmas are needed anymore.
This commit is contained in:
Ralf W. Grosse-Kunstleve 2021-07-30 10:51:50 -07:00 committed by GitHub
parent 9e8a741baa
commit e2573dc961
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,8 @@
# define HAVE_ROUND 1 # define HAVE_ROUND 1
# endif # endif
# pragma warning(push) # pragma warning(push)
# pragma warning(disable: 4510 4610 4512 4005) // C4505: 'PySlice_GetIndicesEx': unreferenced local function has been removed (PyPy only)
# pragma warning(disable: 4505)
# if defined(_DEBUG) && !defined(Py_DEBUG) # if defined(_DEBUG) && !defined(Py_DEBUG)
# define PYBIND11_DEBUG_MARKER # define PYBIND11_DEBUG_MARKER
# undef _DEBUG # undef _DEBUG

View File

@ -13,7 +13,6 @@
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) #if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
# pragma warning(push) # pragma warning(push)
# pragma warning(disable: 4127) // warning C4127: Conditional expression is constant # pragma warning(disable: 4127) // warning C4127: Conditional expression is constant
# pragma warning(disable: 4505) // warning C4505: 'PySlice_GetIndicesEx': unreferenced local function has been removed (PyPy only)
#elif defined(__GNUG__) && !defined(__clang__) && !defined(__INTEL_COMPILER) #elif defined(__GNUG__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
# pragma GCC diagnostic push # pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-but-set-parameter" # pragma GCC diagnostic ignored "-Wunused-but-set-parameter"