From: Jérémie Galarneau Date: Thu, 16 Jun 2022 21:36:41 +0000 (-0400) Subject: Build fix: missing initializer for member 'payload' X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f3742004e5c28961b6b317b01bdaeea4ebaaca0d;p=lttng-tools.git Build fix: missing initializer for member 'payload' 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 Change-Id: Iebb2f14df21f6db9dceaf708af6ef12efda1b929 --- diff --git a/src/common/notification.cpp b/src/common/notification.cpp index e531e511a..51e5693cd 100644 --- a/src/common/notification.cpp +++ b/src/common/notification.cpp @@ -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, ¬ification_comm, sizeof(notification_comm));