From 886656afef4eb287b27a08cb7b346c3404954d17 Mon Sep 17 00:00:00 2001 From: Attila Szakacs Date: Mon, 24 Jun 2024 14:05:52 +0200 Subject: [PATCH] grpc/otel/filterx: ignore MutableRepeatedPtrField() declaration warn 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 --- modules/grpc/otel/filterx/object-otel-kvlist.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/grpc/otel/filterx/object-otel-kvlist.cpp b/modules/grpc/otel/filterx/object-otel-kvlist.cpp index 8dccbf5d34..98ead65208 100644 --- a/modules/grpc/otel/filterx/object-otel-kvlist.cpp +++ b/modules/grpc/otel/filterx/object-otel-kvlist.cpp @@ -31,6 +31,9 @@ #include #include +/* 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;