pretty.c:227 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
This *could* happen if next_status is BT_MESSAGE_ITERATOR_NEXT_STATUS_OK
and count is still 0.
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: I4a08d1bcc2f9b56e225ca17a210a4597169ed746
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1634
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
bt_component_class_sink_consume_method_status pretty_consume(
bt_self_component_sink *comp)
{
- bt_component_class_sink_consume_method_status ret;
+ bt_component_class_sink_consume_method_status ret =
+ BT_COMPONENT_CLASS_SINK_CONSUME_METHOD_STATUS_OK;
bt_message_array_const msgs;
bt_self_component_port_input_message_iterator *it;
struct pretty_component *pretty = bt_self_component_get_data(