From: Jérémie Galarneau Date: Mon, 19 Apr 2021 15:07:12 +0000 (-0400) Subject: Fix: kernel consumerd: use of uninitialized variable X-Git-Tag: v2.13.0-rc1~72 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=afbf29db446cbce8b0c72ca3ffceb552d153fcb1 Fix: kernel consumerd: use of uninitialized variable ‘ret_add_channel’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Jérémie Galarneau Change-Id: I1db71aef9a9585d8737347f8375e688994f56c5f --- 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();