From: Florian Forster Date: Fri, 30 Sep 2016 14:01:54 +0000 (+0200) Subject: grpc plugin: Fix compile error. X-Git-Tag: collectd-5.7.0~61 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ed946a10401f7b46d6e52fabf2a96568a71cb10a;p=collectd.git grpc plugin: Fix compile error. Weirdly, this only surfaces when building with CFLAGS="-O0 -g". In file included from ./daemon/common.h:33:0, from grpc.cc:44: grpc.cc: In member function 'virtual grpc::Status CollectdImpl::PutValues(grpc::ServerContext*, grpc::ServerReader*, collectd::PutValuesResponse*)': ./daemon/plugin.h:113:56: sorry, unimplemented: non-trivial designated initializers not supported #define VALUE_LIST_INIT { .values = NULL, .meta = NULL } ^ grpc.cc:294:22: note: in expansion of macro 'VALUE_LIST_INIT' value_list_t vl = VALUE_LIST_INIT; ^ --- diff --git a/src/grpc.cc b/src/grpc.cc index 15e25931..0ae80bb8 100644 --- a/src/grpc.cc +++ b/src/grpc.cc @@ -291,7 +291,7 @@ public: PutValuesRequest req; while (reader->Read(&req)) { - value_list_t vl = VALUE_LIST_INIT; + value_list_t vl = {0}; auto status = unmarshal_value_list(req.value_list(), &vl); if (!status.ok()) return status;