From 51cf5d01f6bb3035ee33ee6ef2c0ae9352d64a5f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 16 Jun 2022 17:36:41 -0400 Subject: [PATCH] Build fix: missing initializer for member 'payload' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Change-Id: Ie194864415bc3bc32bda6b2ac17150bd3f163394 --- src/common/error-query.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/error-query.cpp b/src/common/error-query.cpp index 38265fe8b..b3904104a 100644 --- a/src/common/error-query.cpp +++ b/src/common/error-query.cpp @@ -311,11 +311,11 @@ int lttng_error_query_result_serialize( 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( -- 2.34.1