Build fix: brace-enclosed initlializer lists error with g++ 4.8
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 20 Mar 2023 19:05:04 +0000 (15:05 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 21 Mar 2023 21:50:42 +0000 (17:50 -0400)
commit5e3b23be3e32286f21523711f6c0fdf5b482a554
treefb867b83d81720a1771e68e21ee42a7b4446e63f
parent40ebe2193c00a3b67294ad38b47537cdd68b0e82
Build fix: brace-enclosed initlializer lists error with g++ 4.8

A build error occurs when building using g++ 4.8 :

 In file included from session.hpp:18:0,
                  from lttng-sessiond.hpp:21,
                  from utils.cpp:10:
 ../../../src/common/pthread-lock.hpp: In constructor 'lttng::pthread::details::mutex::mutex(pthread_mutex_t&)':
 ../../../src/common/pthread-lock.hpp:29:61: error: invalid initialization of non-const reference of type 'pthread_mutex_t&' from an rvalue of type '<brace-enclosed initializer list>'
   explicit mutex(pthread_mutex_t& mutex_p) : _mutex{ mutex_p }

Use oldstyle initialization of references instead.

Change-Id: I2fd756b48fd8e70e30199c86527c025117bfb6ff
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/trace-class.cpp
src/bin/lttng-sessiond/tsdl-trace-class-visitor.cpp
src/common/pthread-lock.hpp
This page took 0.025351 seconds and 4 git commands to generate.