Skip to content

Commit

Permalink
Merge pull request #13088 from fowles/23.x
Browse files Browse the repository at this point in the history
Modify port_def.inc to ignore -Wshadow warning (#13059)
  • Loading branch information
fowles authored Jun 16, 2023
2 parents 0daa1b1 + 1291253 commit 528e673
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions csharp/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Features:
custom implementation of writers with both speed and size optimizations.
- Addition of the "Google.ProtoBuffers.Serialization" assembly to support
reading and writing messages to/from XML, JSON, IDictionary<,> and others.
- Several performance related fixes and tweeks
- Several performance related fixes and tweaks
- Issue 3: Add option to mark generated code with attribute
- Issue 20: Support for decorating classes [Serializable]
- Issue 21: Decorate fields with [deprecated=true] as [System.Obsolete]
Expand Down Expand Up @@ -145,4 +145,4 @@ RELEASE NOTES - Version 0.9.0

- Initial release

===============================================================================
===============================================================================
8 changes: 8 additions & 0 deletions src/google/protobuf/port_def.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,10 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
// 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"
// -Wshadow means that declaration shadows a variable.
// for (int i = 0; i < file_->public_dependency_count(); ++i)
// for (int i = 0; i < public_dep->message_type_count(); ++i)
#pragma clang diagnostic ignored "-Wshadow"
#endif
#ifdef __GNUC__
#pragma GCC diagnostic push
Expand All @@ -1033,6 +1037,10 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
// 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"
// -Wshadow means that declaration shadows a variable.
// for (int i = 0; i < file_->public_dependency_count(); ++i)
// for (int i = 0; i < public_dep->message_type_count(); ++i)
#pragma GCC diagnostic ignored "-Wshadow"
#ifndef __clang__
// This causes spurious warnings in GCC 13.
#pragma GCC diagnostic ignored "-Wstringop-overflow"
Expand Down

0 comments on commit 528e673

Please sign in to comment.