Fix: muxer.c: compare_events(): initialize `ret` to 0
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 9 Aug 2019 13:44:51 +0000 (09:44 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:20 +0000 (11:58 -0400)
commit566921b1b63b48d5c52f56ca0d5f97abc28c2df9
tree8b18caf482eb42bbc30505213e82ab5c07678b24
parent52ec6a3b4575b09e7d22b29d3a9a61bb80a38811
Fix: muxer.c: compare_events(): initialize `ret` to 0

GCC complains when this `ret` is not initialized:

    muxer.c: In function ‘compare_events’:
    muxer.c:993:9: error: ‘ret’ may be used uninitialized in this
                          function [-Werror=maybe-uninitialized]
      return ret;

It reaches `return ret` with an uninitialized `ret` when all the tests
fail to find a difference (which can happen).

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ib0541150173dbc845ba5784abfc5e131412d2663
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1846
Tested-by: jenkins <jenkins@lttng.org>
src/plugins/utils/muxer/muxer.c
This page took 0.02628 seconds and 4 git commands to generate.