From: Jérémie Galarneau Date: Thu, 16 Jun 2022 21:36:41 +0000 (-0400) Subject: Build fix: missing initializer for member 'payload' X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=51cf5d01f6bb3035ee33ee6ef2c0ae9352d64a5f;p=lttng-tools.git Build fix: missing initializer for member 'payload' 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 --- 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(