Skip to content

Commit f1c7820

Browse files
authored
Suppress -Wunused-parameter warning for GCC and clang. (#12355)
* Suppress -Wunused-parameter warning for GCC and clang. Closes #12313 PiperOrigin-RevId: 520066451 * Remove unintended cherrypicked line
1 parent 58ecf38 commit f1c7820

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/google/protobuf/port_def.inc

+6
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,9 @@ static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and
994994
// Turn on -Wdeprecated-enum-enum-conversion. This deprecation comes in C++20
995995
// via http://wg21.link/p1120r0.
996996
#pragma clang diagnostic error "-Wdeprecated-enum-enum-conversion"
997+
// This error has been generally flaky, but we need to disable it specifically
998+
// to fix https://github.com/protocolbuffers/protobuf/issues/12313
999+
#pragma clang diagnostic ignored "-Wunused-parameter"
9971000
#endif
9981001
#ifdef __GNUC__
9991002
#pragma GCC diagnostic push
@@ -1014,6 +1017,9 @@ static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and
10141017
// int index = ...
10151018
// int value = vec[index];
10161019
#pragma GCC diagnostic ignored "-Wsign-conversion"
1020+
// This error has been generally flaky, but we need to disable it specifically
1021+
// to fix https://github.com/protocolbuffers/protobuf/issues/12313
1022+
#pragma GCC diagnostic ignored "-Wunused-parameter"
10171023
#endif // __GNUC__
10181024

10191025
// Silence some MSVC warnings in all our code.

0 commit comments

Comments
 (0)