From f1c7820c9bd0e31f8b7d091092851441ad2716b6 Mon Sep 17 00:00:00 2001 From: deannagarcia <69992229+deannagarcia@users.noreply.github.com> Date: Tue, 28 Mar 2023 13:11:49 -0700 Subject: [PATCH] Suppress -Wunused-parameter warning for GCC and clang. (#12355) * Suppress -Wunused-parameter warning for GCC and clang. Closes https://github.com/protocolbuffers/protobuf/issues/12313 PiperOrigin-RevId: 520066451 * Remove unintended cherrypicked line --- src/google/protobuf/port_def.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc index 90cae4916a..d674ba9bc5 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc @@ -994,6 +994,9 @@ static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and // Turn on -Wdeprecated-enum-enum-conversion. This deprecation comes in C++20 // via http://wg21.link/p1120r0. #pragma clang diagnostic error "-Wdeprecated-enum-enum-conversion" +// This error has been generally flaky, but we need to disable it specifically +// to fix https://github.com/protocolbuffers/protobuf/issues/12313 +#pragma clang diagnostic ignored "-Wunused-parameter" #endif #ifdef __GNUC__ #pragma GCC diagnostic push @@ -1014,6 +1017,9 @@ static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and // int index = ... // int value = vec[index]; #pragma GCC diagnostic ignored "-Wsign-conversion" +// This error has been generally flaky, but we need to disable it specifically +// to fix https://github.com/protocolbuffers/protobuf/issues/12313 +#pragma GCC diagnostic ignored "-Wunused-parameter" #endif // __GNUC__ // Silence some MSVC warnings in all our code.