Skip to content

Commit

Permalink
Merge pull request #176 from alltilla/fix-c++-build-warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAnno authored Jun 24, 2024
2 parents 19b3063 + 886656a commit f7194a7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/compat/cpp-start.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@

#ifdef __cplusplus

#ifndef __STDC_VERSION__
#define __STDC_VERSION__ 0
#endif

#define this this_

extern "C" {
Expand Down
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
2 changes: 1 addition & 1 deletion modules/grpc/protos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ target_include_directories(grpc-protos
PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${PROJECT_SOURCE_DIR}
)

target_compile_options(grpc-protos PRIVATE -Wno-switch-default)
target_compile_options(grpc-protos PRIVATE -Wno-switch-default -Wno-deprecated-declarations)
install(TARGETS grpc-protos LIBRARY DESTINATION lib/syslog-ng COMPONENT grpc-protos)
1 change: 1 addition & 0 deletions modules/grpc/protos/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ modules_grpc_protos_libgrpc_protos_la_CXXFLAGS = \
$(AM_CXXFLAGS) \
$(PROTOBUF_CFLAGS) \
$(GRPCPP_CFLAGS) \
-Wno-deprecated-declarations \
-I$(GOOGLEAPIS_PROTO_SRCDIR) \
-I$(GOOGLEAPIS_PROTO_BUILDDIR) \
-I$(OPENTELEMETRY_PROTO_SRCDIR) \
Expand Down

0 comments on commit f7194a7

Please sign in to comment.