From 83885b70dcfbcee908957d8a8057870c6f6c1273 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Wed, 12 Apr 2023 14:14:21 -0400 Subject: [PATCH] Build fix: brace-enclosed initlializer lists error with g++ 4.8 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit A build error occurs when building using g++ 4.8 : rotation-thread.cpp: In constructor 'lttng::sessiond::rotation_thread::rotation_thread(lttng::sessiond::rotation_thread_timer_queue&, notification_thread_handle&)': rotation-thread.cpp:400:58: error: invalid initialization of non-const reference of type 'lttng::sessiond::rotation_thread_timer_queue&' from an rvalue of type '' _notification_thread_handle{ notification_thread_handle } Use old-style initialization of references instead. Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau Change-Id: Ia3392a88b8a2d8dd8c60330c16229f507338e7cd --- src/bin/lttng-sessiond/rotation-thread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/lttng-sessiond/rotation-thread.cpp b/src/bin/lttng-sessiond/rotation-thread.cpp index bc7893475..1f82176f8 100644 --- a/src/bin/lttng-sessiond/rotation-thread.cpp +++ b/src/bin/lttng-sessiond/rotation-thread.cpp @@ -395,8 +395,8 @@ void ls::rotation_thread_timer_queue_destroy(struct rotation_thread_timer_queue ls::rotation_thread::rotation_thread(rotation_thread_timer_queue& rotation_timer_queue, notification_thread_handle& notification_thread_handle) : - _rotation_timer_queue{ rotation_timer_queue }, - _notification_thread_handle{ notification_thread_handle } + _rotation_timer_queue(rotation_timer_queue), + _notification_thread_handle(notification_thread_handle) { _quit_pipe.reset([]() { auto raw_pipe = lttng_pipe_open(FD_CLOEXEC); -- 2.34.1