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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 9 Aug 2019 14:21:24 +0000 (10:21 -0400)
commitf1089572ca6ab9daa623a17af78bd4947850e38a
treefe173a7b2f8507aa79ef717ddb989d1509299a3d
parentbe5d04a69d871a17842af4cbf8421be7a9d5bbbb
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.027066 seconds and 4 git commands to generate.