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:
event.cpp:1238:53: warning: missing initializer for member 'lttng_event_context_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: Id7c01cd19cbf884efd16734239cae8476b798c20

src/common/event.cpp

index 4207b73471c5b943778c120950f3b7df849fc080..f33518eee4eece45c2c8ce762cb22765a682209b 100644 (file)
@@ -1237,7 +1237,9 @@ int lttng_event_context_serialize(struct lttng_event_context *context,
                struct lttng_payload *payload)
 {
        int ret;
-       struct lttng_event_context_comm context_comm = { 0 };
+       struct lttng_event_context_comm context_comm;
+
+       context_comm.type = 0;
 
        assert(context);
        assert(payload);
This page took 0.026523 seconds and 4 git commands to generate.