diff options
author | Andrej Rode <andrej.rode@ettus.com> | 2017-04-25 12:30:33 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-04-25 17:15:13 -0700 |
commit | d2a354bbe4b8ecd81f5c3bdb459a9ae822f91e9a (patch) | |
tree | 05f80977c66939156f77ea35fcaff18c9075b43f /host | |
parent | 86c74ee9b497da42df30870a7943f011151b7a49 (diff) | |
download | uhd-d2a354bbe4b8ecd81f5c3bdb459a9ae822f91e9a.tar.gz uhd-d2a354bbe4b8ecd81f5c3bdb459a9ae822f91e9a.tar.bz2 uhd-d2a354bbe4b8ecd81f5c3bdb459a9ae822f91e9a.zip |
uhd: cast thread_group.create_thread() return value to void to avoid memory leak
Diffstat (limited to 'host')
-rw-r--r-- | host/examples/network_relay.cpp | 4 | ||||
-rw-r--r-- | host/lib/utils/tasks.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/host/examples/network_relay.cpp b/host/examples/network_relay.cpp index b16bcaaa5..7e354934a 100644 --- a/host/examples/network_relay.cpp +++ b/host/examples/network_relay.cpp @@ -100,9 +100,9 @@ public: std::cout << "spawning relay threads... " << _port << std::endl; boost::unique_lock<boost::mutex> lock(spawn_mutex); // lock in preparation to wait for threads to spawn - _thread_group.create_thread(boost::bind(&udp_relay_type::server_thread, this)); + (void)_thread_group.create_thread(boost::bind(&udp_relay_type::server_thread, this)); wait_for_thread.wait(lock); // wait for thread to spin up - _thread_group.create_thread(boost::bind(&udp_relay_type::client_thread, this)); + (void)_thread_group.create_thread(boost::bind(&udp_relay_type::client_thread, this)); wait_for_thread.wait(lock); // wait for thread to spin up std::cout << " done!" << std::endl << std::endl; } diff --git a/host/lib/utils/tasks.cpp b/host/lib/utils/tasks.cpp index 1e8f50736..661315ae8 100644 --- a/host/lib/utils/tasks.cpp +++ b/host/lib/utils/tasks.cpp @@ -32,7 +32,7 @@ public: task_impl(const task_fcn_type &task_fcn): _spawn_barrier(2) { - _thread_group.create_thread(boost::bind(&task_impl::task_loop, this, task_fcn)); + (void)_thread_group.create_thread(boost::bind(&task_impl::task_loop, this, task_fcn)); _spawn_barrier.wait(); } @@ -99,7 +99,7 @@ public: msg_task_impl(const task_fcn_type &task_fcn): _spawn_barrier(2) { - _thread_group.create_thread(boost::bind(&msg_task_impl::task_loop, this, task_fcn)); + (void)_thread_group.create_thread(boost::bind(&msg_task_impl::task_loop, this, task_fcn)); _spawn_barrier.wait(); } |