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>
static
int compare_events(const bt_event *left_event, const bt_event *right_event)
{
- int ret;
+ int ret = 0;
const bt_event_class *left_event_class, *right_event_class;
uint64_t left_event_class_id, right_event_class_id;
const char *left_event_class_name, *right_event_class_name,