gcc 5.4.0 complains that:
error-query.cpp:318:2: warning: missing initializer for member '{anonymous}::lttng_error_query_result_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: Ie194864415bc3bc32bda6b2ac17150bd3f163394
struct lttng_payload *payload)
{
int ret;
- struct lttng_error_query_result_comm header = {
- .type = (uint8_t) result->type,
- .name_len = (typeof(header.name_len)) strlen(result->name) + 1,
- .description_len = (typeof(header.name_len)) strlen(result->description) + 1,
- };
+ struct lttng_error_query_result_comm header;
+
+ header.type = (uint8_t) result->type;
+ header.name_len = (typeof(header.name_len)) strlen(result->name) + 1;
+ header.description_len = (typeof(header.name_len)) strlen(result->description) + 1;
/* Header. */
ret = lttng_dynamic_buffer_append(