Fix: kernel consumerd: use of uninitialized variable
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 19 Apr 2021 15:07:12 +0000 (11:07 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 19 Apr 2021 15:07:15 +0000 (11:07 -0400)
‘ret_add_channel’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I1db71aef9a9585d8737347f8375e688994f56c5f

src/common/kernel-consumer/kernel-consumer.c

index 4ace64920109dd38e58e75dad6452a78518b47b8..083c8c0c7143b5c1048221f3868916885e3d90bf 100644 (file)
@@ -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();
This page took 0.026813 seconds and 4 git commands to generate.