From: Francis Dupont Date: Sat, 18 Oct 2025 12:16:05 +0000 (+0200) Subject: [#3451] Disabled -Wshadow in asio_wrapper.h X-Git-Tag: Kea-3.1.3~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d336111c5a8db0b4e89451858247bdd6cc52148f;p=thirdparty%2Fkea.git [#3451] Disabled -Wshadow in asio_wrapper.h --- diff --git a/src/lib/asiolink/asio_wrapper.h b/src/lib/asiolink/asio_wrapper.h index a33c56f2d4..e037678bc3 100644 --- a/src/lib/asiolink/asio_wrapper.h +++ b/src/lib/asiolink/asio_wrapper.h @@ -64,13 +64,18 @@ // Include it in all situations for simplicity. #include +// Another problem is some boost versions raise a warning with -Wshadow +// so disable it. + #define GNU_CC_VERSION (__GNUC__ * 10000 \ + __GNUC_MINOR__ * 100 \ + __GNUC_PATCHLEVEL__) -#if (defined(__GNUC__) && \ - ((GNU_CC_VERSION >= 50200) && (GNU_CC_VERSION < 60000)) \ - && defined(BOOST_ERROR_CODE_HEADER_ONLY)) +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" +#if (((GNU_CC_VERSION >= 50200) && (GNU_CC_VERSION < 60000)) \ + && defined(BOOST_ERROR_CODE_HEADER_ONLY)) #pragma GCC push_options #pragma GCC optimize ("O0") #include @@ -78,5 +83,9 @@ #else #include #endif +#pragma GCC diagnostic pop +#else +#include +#endif #endif // ASIO_WRAPPER_H