Skip to content

Commit

Permalink
grpc/otel/filterx: ignore MutableRepeatedPtrField() declaration warn
Browse files Browse the repository at this point in the history
The protoc generated codes are using
RepeatedPtrField in the classes.

The recommended GetMutableRepeatedFieldRef()
function returns a MutableRepeatedFieldRef object,
which is incompatible with RepeatedPtrField.

The ideal thing would be if protoc generated such
codes that use MutableRepeatedFieldRef, or we had
a conversion API between the two.

Signed-off-by: Attila Szakacs <[email protected]>
  • Loading branch information
alltilla committed Jun 24, 2024
1 parent 852ca47 commit 886656a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/grpc/otel/filterx/object-otel-kvlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
#include <google/protobuf/reflection.h>
#include <stdexcept>

/* The deprecated MutableRepeatedPtrField() does not have a proper alternative. */
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

using namespace syslogng::grpc::otel::filterx;
using opentelemetry::proto::common::v1::KeyValueList;
using opentelemetry::proto::common::v1::AnyValue;
Expand Down

0 comments on commit 886656a

Please sign in to comment.