gcc 5.4.0 complains that:
error-query.cpp:570:2: warning: missing initializer for member '{anonymous}::lttng_error_query_results_comm::payload' [-Wmissing-field-initializers]
The structure's members are initialized one by one.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ib1a297eaf2fd75b908573ac252b433a14423add5
size_t result_index;
const size_t result_count = lttng_dynamic_pointer_array_get_count(
&results->results);
- const struct lttng_error_query_results_comm header = {
- .count = (decltype(header.count)) result_count,
- };
+ struct lttng_error_query_results_comm header;
+
+ header.count = (decltype(header.count)) result_count;
/* Header. */
ret = lttng_dynamic_buffer_append(&payload->buffer, &header, sizeof(header));