Detected by GCC:
muxer.c: In function ‘muxer_msg_iter_can_seek_beginning’:
muxer.c:1541:9: error: ‘status’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
return status;
^~~~~~
muxer.c:1529:5: error: ‘status’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
if (status != BT_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_STATUS_OK) {
^
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I55ad73aeb9595796bdcddff5ba4d2895d5f2314e
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2073
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
muxer_upstream_msg_iters_can_all_seek_beginning(
GPtrArray *muxer_upstream_msg_iters, bt_bool *can_seek)
{
muxer_upstream_msg_iters_can_all_seek_beginning(
GPtrArray *muxer_upstream_msg_iters, bt_bool *can_seek)
{
- bt_component_class_message_iterator_can_seek_beginning_method_status status;
+ bt_component_class_message_iterator_can_seek_beginning_method_status status =
+ BT_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_STATUS_OK;
uint64_t i;
for (i = 0; i < muxer_upstream_msg_iters->len; i++) {
uint64_t i;
for (i = 0; i < muxer_upstream_msg_iters->len; i++) {