From d9d124b3c8b38fbc7b6be1681d01ebc59d2fd48b Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 30 Jul 2021 03:37:14 -0700 Subject: [PATCH 1/3] Moving pragma for C4505 from pybind11.h to existing list in detail/common.h. --- include/pybind11/detail/common.h | 2 +- include/pybind11/pybind11.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index 0add6272f5..c52e72ff59 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -121,7 +121,7 @@ # define HAVE_ROUND 1 # endif # pragma warning(push) -# pragma warning(disable: 4510 4610 4512 4005) +# pragma warning(disable: 4510 4610 4512 4005 4505) # if defined(_DEBUG) && !defined(Py_DEBUG) # define PYBIND11_DEBUG_MARKER # undef _DEBUG diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 16615421dc..ec6bd8d351 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -13,7 +13,6 @@ #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) # pragma warning(push) # 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) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wunused-but-set-parameter" From 9627e554c73fb5e793f18d9538e3d9d2f30c105c Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 30 Jul 2021 07:54:20 -0700 Subject: [PATCH 2/3] Removing 4 existing suppressions to 1. see what is still needed and 2. capture the MSVC messages. --- include/pybind11/detail/common.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index c52e72ff59..6e4e0020de 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -121,7 +121,12 @@ # define HAVE_ROUND 1 # endif # pragma warning(push) -# pragma warning(disable: 4510 4610 4512 4005 4505) +// C4005: TODO +// C4505: 'PySlice_GetIndicesEx': unreferenced local function has been removed (PyPy only) +// C4510: TODO +// C4512: TODO +// C4610: TODO +# pragma warning(disable: 4505) # if defined(_DEBUG) && !defined(Py_DEBUG) # define PYBIND11_DEBUG_MARKER # undef _DEBUG From a3f1c3d08ea1e0d7fee969744e6be64f4401cfd8 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 30 Jul 2021 08:09:24 -0700 Subject: [PATCH 3/3] It turns out none of the 4 pragmas are needed anymore. --- include/pybind11/detail/common.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index 6e4e0020de..5f0af97248 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -121,11 +121,7 @@ # define HAVE_ROUND 1 # endif # pragma warning(push) -// C4005: TODO // C4505: 'PySlice_GetIndicesEx': unreferenced local function has been removed (PyPy only) -// C4510: TODO -// C4512: TODO -// C4610: TODO # pragma warning(disable: 4505) # if defined(_DEBUG) && !defined(Py_DEBUG) # define PYBIND11_DEBUG_MARKER