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=332000d3213e4d0a8d5e4c889ff0c1cf5171d39c;p=lttng-tools.git Build fix: missing initializer for member 'payload' 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 Change-Id: Ib1a297eaf2fd75b908573ac252b433a14423add5 --- diff --git a/src/common/error-query.cpp b/src/common/error-query.cpp index b3904104a..1444be175 100644 --- a/src/common/error-query.cpp +++ b/src/common/error-query.cpp @@ -565,9 +565,9 @@ int lttng_error_query_results_serialize( 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));