From 870eca8a294f8cae63b199ca80899319cdc18d2b Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 8 Jan 2025 18:05:41 +0100 Subject: [PATCH] tests/cpputest-client.cpp: use HAVE_PRAGMA_CLANG_DIAGNOSTIC_IGNORED_DEPRECATED_DECLARATIONS for new clang-19 Signed-off-by: Jim Klimov --- tests/cpputest-client.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/cpputest-client.cpp b/tests/cpputest-client.cpp index bcd6ae719c..9b745bc152 100644 --- a/tests/cpputest-client.cpp +++ b/tests/cpputest-client.cpp @@ -62,8 +62,10 @@ # pragma GCC diagnostic ignored "-Wold-style-cast" # endif #endif -#ifdef __clang__ -# pragma clang diagnostic push "-Wdeprecated-declarations" +#if (defined __clang__) && (defined HAVE_PRAGMA_CLANG_DIAGNOSTIC_IGNORED_DEPRECATED_DECLARATIONS) +# ifdef HAVE_PRAGMA_CLANG_DIAGNOSTIC_IGNORED_DEPRECATED_DECLARATIONS +# pragma clang diagnostic push "-Wdeprecated-declarations" +# endif #endif #include @@ -500,7 +502,7 @@ void NutActiveClientTest::test_auth_primary() { } // namespace nut {} -#ifdef __clang__ +#if (defined __clang__) && (defined HAVE_PRAGMA_CLANG_DIAGNOSTIC_IGNORED_DEPRECATED_DECLARATIONS) # pragma clang diagnostic pop #endif #if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_EXIT_TIME_DESTRUCTORS || defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_GLOBAL_CONSTRUCTORS || defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_DEPRECATED_DECLARATIONS || defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_SUGGEST_OVERRIDE_BESIDEFUNC || defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_SUGGEST_DESTRUCTOR_OVERRIDE_BESIDEFUNC || defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_WEAK_VTABLES_BESIDEFUNC || defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_DEPRECATED_DYNAMIC_EXCEPTION_SPEC_BESIDEFUNC || defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_EXTRA_SEMI_BESIDEFUNC || defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_OLD_STYLE_CAST_BESIDEFUNC)