From: Simon Marchi Date: Thu, 26 May 2022 15:30:10 +0000 (-0400) Subject: src.ctf.lttng-live: remove unused variable in live_get_msg_ts_ns X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=fece76caa87df3cdd532fa46668ab6f127971b02 src.ctf.lttng-live: remove unused variable in live_get_msg_ts_ns clock_class is assigned, but never used outside of assertions, remove it (I don't think the assertions are particularly important here). Change-Id: I8b7e23bb14d51837d6120567cb303a0436c8648a Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/8129 Tested-by: jenkins Reviewed-by: Philippe Proulx --- diff --git a/src/plugins/ctf/lttng-live/lttng-live.cpp b/src/plugins/ctf/lttng-live/lttng-live.cpp index 8b4fbb41..b3e19d9c 100644 --- a/src/plugins/ctf/lttng-live/lttng-live.cpp +++ b/src/plugins/ctf/lttng-live/lttng-live.cpp @@ -728,7 +728,6 @@ static int live_get_msg_ts_ns(struct lttng_live_stream_iterator *stream_iter, struct lttng_live_msg_iter *lttng_live_msg_iter, const bt_message *msg, int64_t last_msg_ts_ns, int64_t *ts_ns) { - const bt_clock_class *clock_class = NULL; const bt_clock_snapshot *clock_snapshot = NULL; int ret = 0; bt_logging_level log_level = lttng_live_msg_iter->log_level; @@ -743,37 +742,19 @@ static int live_get_msg_ts_ns(struct lttng_live_stream_iterator *stream_iter, switch (bt_message_get_type(msg)) { case BT_MESSAGE_TYPE_EVENT: - clock_class = bt_message_event_borrow_stream_class_default_clock_class_const(msg); - BT_ASSERT_DBG(clock_class); - clock_snapshot = bt_message_event_borrow_default_clock_snapshot_const(msg); break; case BT_MESSAGE_TYPE_PACKET_BEGINNING: - clock_class = - bt_message_packet_beginning_borrow_stream_class_default_clock_class_const(msg); - BT_ASSERT(clock_class); - clock_snapshot = bt_message_packet_beginning_borrow_default_clock_snapshot_const(msg); break; case BT_MESSAGE_TYPE_PACKET_END: - clock_class = bt_message_packet_end_borrow_stream_class_default_clock_class_const(msg); - BT_ASSERT(clock_class); - clock_snapshot = bt_message_packet_end_borrow_default_clock_snapshot_const(msg); break; case BT_MESSAGE_TYPE_DISCARDED_EVENTS: - clock_class = - bt_message_discarded_events_borrow_stream_class_default_clock_class_const(msg); - BT_ASSERT(clock_class); - clock_snapshot = bt_message_discarded_events_borrow_beginning_default_clock_snapshot_const(msg); break; case BT_MESSAGE_TYPE_DISCARDED_PACKETS: - clock_class = - bt_message_discarded_packets_borrow_stream_class_default_clock_class_const(msg); - BT_ASSERT(clock_class); - clock_snapshot = bt_message_discarded_packets_borrow_beginning_default_clock_snapshot_const(msg); break; @@ -787,9 +768,6 @@ static int live_get_msg_ts_ns(struct lttng_live_stream_iterator *stream_iter, goto end; } - clock_class = bt_clock_snapshot_borrow_clock_class_const(clock_snapshot); - BT_ASSERT_DBG(clock_class); - ret = bt_clock_snapshot_get_ns_from_origin(clock_snapshot, ts_ns); if (ret) { BT_COMP_LOGE_APPEND_CAUSE(self_comp,