Build fix: missing initializer for member 'override_name'
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 16 Jun 2022 21:36:41 +0000 (17:36 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 17 Jun 2022 14:56:45 +0000 (10:56 -0400)
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 <jeremie.galarneau@efficios.com>
Change-Id: I6607c46e4aa98017183f41fc8be9b0226b70cf29

src/common/relayd/relayd.cpp

index e012d25401134cc9a40808ffc34360cb1770b99f..12658dc6856655320203e84e8e542d97130876c5 100644 (file)
@@ -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) {
This page took 0.025904 seconds and 4 git commands to generate.