From e2a8bab98a2b95a8a1df96213525ce39986b168b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 27 Jan 2023 15:50:35 +0530 Subject: [PATCH] Narrow the scope of ignoring the warning --- src/calibre/utils/cpp_binding.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/utils/cpp_binding.h b/src/calibre/utils/cpp_binding.h index 5877640931..469b998eeb 100644 --- a/src/calibre/utils/cpp_binding.h +++ b/src/calibre/utils/cpp_binding.h @@ -54,6 +54,9 @@ static inline void wchar_raii_free(wchar_t *x) { PyMem_Free(x); } #pragma GCC diagnostic ignored "-Wsubobject-linkage" #endif class wchar_raii : public generic_raii(NULL)> { +#if (defined(__GNUC__) && !defined(__clang__)) +#pragma GCC diagnostic pop +#endif private: Py_ssize_t sz; public: @@ -73,9 +76,6 @@ class wchar_raii : public generic_raii pyobject_raii;