From afbf29db446cbce8b0c72ca3ffceb552d153fcb1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Mon, 19 Apr 2021 11:07:12 -0400 Subject: [PATCH] Fix: kernel consumerd: use of uninitialized variable MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ‘ret_add_channel’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Jérémie Galarneau Change-Id: I1db71aef9a9585d8737347f8375e688994f56c5f --- src/common/kernel-consumer/kernel-consumer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/kernel-consumer/kernel-consumer.c b/src/common/kernel-consumer/kernel-consumer.c index 4ace64920..083c8c0c7 100644 --- a/src/common/kernel-consumer/kernel-consumer.c +++ b/src/common/kernel-consumer/kernel-consumer.c @@ -494,7 +494,7 @@ int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx, case LTTNG_CONSUMER_ADD_CHANNEL: { struct lttng_consumer_channel *new_channel; - int ret_send_status, ret_add_channel; + int ret_send_status, ret_add_channel = 0; const uint64_t chunk_id = msg.u.channel.chunk_id.value; health_code_update(); -- 2.34.1