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=219d1f6ac5b3e339e9f730a91ea4ad98fee15e77;p=lttng-tools.git Build fix: missing initializer for member 'payload' gcc 5.4.0 complains that: error-query.cpp:777:2: warning: missing initializer for member '{anonymous}::lttng_error_query_comm::payload' [-Wmissing-field-initializers] The structure's members are initialized one by one. Signed-off-by: Jérémie Galarneau Change-Id: I1264bc2da7e8ff6ec6c740341a381b33bae643d1 --- diff --git a/src/common/error-query.cpp b/src/common/error-query.cpp index 1444be175..d3831ae81 100644 --- a/src/common/error-query.cpp +++ b/src/common/error-query.cpp @@ -772,9 +772,9 @@ int lttng_error_query_serialize(const struct lttng_error_query *query, struct lttng_payload *payload) { int ret; - const struct lttng_error_query_comm header = { - .target_type = (decltype(header.target_type)) query->target_type, - }; + struct lttng_error_query_comm header; + + header.target_type = (decltype(header.target_type)) query->target_type; ret = lttng_dynamic_buffer_append( &payload->buffer, &header, sizeof(header));