From 39036442e68ae66beb2f9c111c8e5378a9307533 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Sat, 6 May 2017 14:59:48 -0400 Subject: [PATCH] Silence bogus Coverity warning of uninitialized value MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Coverity complains that struct lttng_notification_comm's payload field is not initialized. "payload" is a flexible array member which should be ignored. Normally, a such a member _could_ result in additional padding added at the end of the structure. In this case, the structure is declared as packed. Nonetheless, using a designated initializer gets rid of the ambiguity and silences Coverity. Signed-off-by: Jérémie Galarneau --- src/common/notification.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/notification.c b/src/common/notification.c index 5062ca5b1..785af6816 100644 --- a/src/common/notification.c +++ b/src/common/notification.c @@ -50,7 +50,7 @@ ssize_t lttng_notification_serialize(struct lttng_notification *notification, char *buf) { ssize_t ret, condition_size, evaluation_size, offset = 0; - struct lttng_notification_comm notification_comm; + struct lttng_notification_comm notification_comm = { 0 }; if (!notification) { ret = -1; -- 2.34.1