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:
notification.cpp:43:57: warning: missing initializer for member 'lttng_notification_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: Iebb2f14df21f6db9dceaf708af6ef12efda1b929

src/common/notification.cpp

index e531e511a26c08897ec29bb3310f4f14a6e591cc..51e5693cd464fb2bb4ebd96c0c60862da6b5ca3d 100644 (file)
@@ -40,9 +40,11 @@ int lttng_notification_serialize(const struct lttng_notification *notification,
 {
        int ret;
        size_t header_offset, size_before_payload;
-       struct lttng_notification_comm notification_comm = { 0 };
+       struct lttng_notification_comm notification_comm;
        struct lttng_notification_comm *header;
 
+       notification_comm.length = 0;
+
        header_offset = payload->buffer.size;
        ret = lttng_dynamic_buffer_append(&payload->buffer, &notification_comm,
                        sizeof(notification_comm));
This page took 0.026287 seconds and 4 git commands to generate.