From c1c885a046dbccd1a81487e98b72ddcb030a5d9d Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 16 Jan 2025 23:37:33 +0100 Subject: [PATCH] autotest/cpp: really fix warning on fedora:rawhide --- autotest/cpp/gtest_include.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/autotest/cpp/gtest_include.h b/autotest/cpp/gtest_include.h index 2ba176edbdbe..836af6c9cd0c 100644 --- a/autotest/cpp/gtest_include.h +++ b/autotest/cpp/gtest_include.h @@ -17,4 +17,14 @@ #pragma GCC system_header #endif +#if defined(__GNUC__) +// Workaround https://github.com/google/googletest/issues/4701 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcpp" +#endif + #include "gtest/gtest.h" + +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif