From: Jérémie Galarneau Date: Thu, 16 Jun 2022 21:36:41 +0000 (-0400) Subject: Build fix: missing initializer for member 'override_name' X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c15e2d3d72435e0e1e73db51b1ef896a75740ef0;p=lttng-tools.git Build fix: missing initializer for member 'override_name' gcc 5.4.0 complains that: relayd/relayd.cpp:1353:2: warning: missing initializer for member 'lttcomm_relayd_create_trace_chunk::override_name' [-Wmissing-field-initializers] The structure's members are initialized one by one. Signed-off-by: Jérémie Galarneau Change-Id: I6607c46e4aa98017183f41fc8be9b0226b70cf29 --- diff --git a/src/common/relayd/relayd.cpp b/src/common/relayd/relayd.cpp index e012d2540..12658dc68 100644 --- a/src/common/relayd/relayd.cpp +++ b/src/common/relayd/relayd.cpp @@ -1346,11 +1346,9 @@ int relayd_create_trace_chunk(struct lttcomm_relayd_sock *sock, } chunk_name_length = overridden_name ? (strlen(chunk_name) + 1) : 0; - msg = (typeof(msg)){ - .chunk_id = htobe64(chunk_id), - .creation_timestamp = htobe64((uint64_t) creation_timestamp), - .override_name_length = htobe32((uint32_t) chunk_name_length), - }; + msg.chunk_id = htobe64(chunk_id); + msg.creation_timestamp = htobe64((uint64_t) creation_timestamp); + msg.override_name_length = htobe32((uint32_t) chunk_name_length); ret = lttng_dynamic_buffer_append(&payload, &msg, sizeof(msg)); if (ret) {