Fix: muxer_upstream_msg_iters_can_all_seek_beginning(): init. `status`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 20 Sep 2019 08:10:16 +0000 (04:10 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 23 Sep 2019 15:18:01 +0000 (11:18 -0400)
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>
src/plugins/utils/muxer/muxer.c

index 50473050dcdf4050e24e767f5231f4c5f211d3a9..12485df8cd8cda896b62d42bf6bf508f05c654c4 100644 (file)
@@ -1395,7 +1395,8 @@ bt_component_class_message_iterator_can_seek_beginning_method_status
 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++) {
This page took 0.025115 seconds and 4 git commands to generate.