Skip to content

Commit 21c3c53

Browse files
tonyliaosscopybara-github
authored andcommitted
Treat warnings encountered in chromium builds as errors.
Chromium x86_64 builds with -Wconstant-conversion and -Wunused-label as errors. Since chromium is an important protobuf customer, we should preferably be detecting their build failures as early as possible (in development time). PiperOrigin-RevId: 772147894
1 parent f63e9fb commit 21c3c53

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/google/protobuf/port_def.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,10 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
780780
// Turn on -Wdeprecated-enum-enum-conversion. This deprecation comes in C++20
781781
// via http://wg21.link/p1120r0.
782782
#pragma clang diagnostic error "-Wdeprecated-enum-enum-conversion"
783+
// Turn on -Wconstant-conversion which is used in chromiumos_x86_64 builds.
784+
#pragma clang diagnostic error "-Wconstant-conversion"
785+
// Turn on -Wunused-label which is used in chromiumos_x86_64 builds.
786+
#pragma clang diagnostic error "-Wunused-label"
783787
// This error has been generally flaky, but we need to disable it specifically
784788
// to fix https://github.com/protocolbuffers/protobuf/issues/12313
785789
#pragma clang diagnostic ignored "-Wunused-parameter"

0 commit comments

Comments
 (0)