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:
evaluation.cpp:30:2: warning: missing initializer for member 'lttng_evaluation_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: I2784138b00af34b2bc47ed28097ab32afaa379d2

src/common/evaluation.cpp

index e6ebeec8e2680b07ef37850847bd67ff62281630..2b57de62cbb5ab07c37cceb9e38bd63188390194 100644 (file)
@@ -25,9 +25,9 @@ int lttng_evaluation_serialize(const struct lttng_evaluation *evaluation,
                struct lttng_payload *payload)
 {
        int ret;
-       struct lttng_evaluation_comm evaluation_comm = {
-               .type = (int8_t) evaluation->type
-       };
+       struct lttng_evaluation_comm evaluation_comm;
+
+       evaluation_comm.type = (int8_t) evaluation->type;
 
        ret = lttng_dynamic_buffer_append(&payload->buffer, &evaluation_comm,
                        sizeof(evaluation_comm));
This page took 0.027858 seconds and 4 git commands to generate.