Build fix: missing initializer for member 'payload'
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:44 +0000 (10:56 -0400)
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 <jeremie.galarneau@efficios.com>
Change-Id: Ib1a297eaf2fd75b908573ac252b433a14423add5

src/common/error-query.cpp

index b3904104a71d9547fc6906f97f14a596374b64ea..1444be1750e5542c24504fefd052783f21e0eab3 100644 (file)
@@ -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));
This page took 0.025631 seconds and 4 git commands to generate.