From e1b5f9d786d6ff3dca6928aac145c8765b000314 Mon Sep 17 00:00:00 2001 From: "Vicente J. Botet Escriba" Date: Thu, 18 Oct 2018 18:59:49 +0200 Subject: [PATCH] Try to catch the CircleCi clang issues. --- include/boost/thread/detail/move.hpp | 10 +++++----- src/pthread/thread.cpp | 2 +- test/test_5542_2.cpp | 2 +- test/test_condition_notify_all.cpp | 6 +++--- test/test_condition_notify_one.cpp | 6 +++--- test/test_move_function.cpp | 6 +++--- test/test_once.cpp | 2 +- test/test_thread_exit.cpp | 2 +- test/test_thread_id.cpp | 2 +- test/test_thread_launching.cpp | 4 ++-- 10 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/boost/thread/detail/move.hpp b/include/boost/thread/detail/move.hpp index 58329a18..447247d5 100644 --- a/include/boost/thread/detail/move.hpp +++ b/include/boost/thread/detail/move.hpp @@ -358,11 +358,11 @@ namespace boost } typedef void (*void_fct_ptr)(); - inline void_fct_ptr - decay_copy(void (&t)()) - { - return &t; - } +// inline void_fct_ptr +// decay_copy(void (&t)()) +// { +// return &t; +// } #else template typename decay::type diff --git a/src/pthread/thread.cpp b/src/pthread/thread.cpp index b77f28df..1b76570b 100644 --- a/src/pthread/thread.cpp +++ b/src/pthread/thread.cpp @@ -149,7 +149,7 @@ namespace boost boost::detail::thread_data_base* get_current_thread_data() { - boost::call_once(current_thread_tls_init_flag,create_current_thread_tls_key); + boost::call_once(current_thread_tls_init_flag,&create_current_thread_tls_key); return (boost::detail::thread_data_base*)pthread_getspecific(current_thread_tls_key); } diff --git a/test/test_5542_2.cpp b/test/test_5542_2.cpp index 21256602..b0c48cf9 100644 --- a/test/test_5542_2.cpp +++ b/test/test_5542_2.cpp @@ -12,7 +12,7 @@ void run_thread() { } int main() { - boost::thread t(run_thread); + boost::thread t(&run_thread); return 0; } diff --git a/test/test_condition_notify_all.cpp b/test/test_condition_notify_all.cpp index 017ff28d..17c84d5d 100644 --- a/test/test_condition_notify_all.cpp +++ b/test/test_condition_notify_all.cpp @@ -179,13 +179,13 @@ namespace void do_test_notify_all_following_notify_one_wakes_all_threads() { - boost::thread thread1(wait_for_condvar_and_increase_count); - boost::thread thread2(wait_for_condvar_and_increase_count); + boost::thread thread1(&wait_for_condvar_and_increase_count); + boost::thread thread2(&wait_for_condvar_and_increase_count); boost::this_thread::sleep(boost::posix_time::milliseconds(200)); multiple_wake_cond.notify_one(); - boost::thread thread3(wait_for_condvar_and_increase_count); + boost::thread thread3(&wait_for_condvar_and_increase_count); boost::this_thread::sleep(boost::posix_time::milliseconds(200)); multiple_wake_cond.notify_one(); diff --git a/test/test_condition_notify_one.cpp b/test/test_condition_notify_one.cpp index 23fe74df..00aff626 100644 --- a/test/test_condition_notify_one.cpp +++ b/test/test_condition_notify_one.cpp @@ -114,13 +114,13 @@ namespace void do_test_multiple_notify_one_calls_wakes_multiple_threads() { - boost::thread thread1(wait_for_condvar_and_increase_count); - boost::thread thread2(wait_for_condvar_and_increase_count); + boost::thread thread1(&wait_for_condvar_and_increase_count); + boost::thread thread2(&wait_for_condvar_and_increase_count); boost::this_thread::sleep(boost::posix_time::milliseconds(200)); multiple_wake_cond.notify_one(); - boost::thread thread3(wait_for_condvar_and_increase_count); + boost::thread thread3(&wait_for_condvar_and_increase_count); boost::this_thread::sleep(boost::posix_time::milliseconds(200)); multiple_wake_cond.notify_one(); diff --git a/test/test_move_function.cpp b/test/test_move_function.cpp index 1fef7a3b..6922fbe6 100644 --- a/test/test_move_function.cpp +++ b/test/test_move_function.cpp @@ -16,7 +16,7 @@ void do_nothing() BOOST_AUTO_TEST_CASE(test_thread_move_from_lvalue_on_construction) { - boost::thread src(do_nothing); + boost::thread src(&do_nothing); boost::thread::id src_id=src.get_id(); boost::thread dest(boost::move(src)); boost::thread::id dest_id=dest.get_id(); @@ -27,7 +27,7 @@ BOOST_AUTO_TEST_CASE(test_thread_move_from_lvalue_on_construction) BOOST_AUTO_TEST_CASE(test_thread_move_from_lvalue_on_assignment) { - boost::thread src(do_nothing); + boost::thread src(&do_nothing); boost::thread::id src_id=src.get_id(); boost::thread dest; dest=boost::move(src); @@ -39,7 +39,7 @@ BOOST_AUTO_TEST_CASE(test_thread_move_from_lvalue_on_assignment) boost::thread start_thread() { - return boost::thread(do_nothing); + return boost::thread(&do_nothing); } BOOST_AUTO_TEST_CASE(test_thread_move_from_rvalue_on_construction) diff --git a/test/test_once.cpp b/test/test_once.cpp index 81f5085a..3103f1c2 100644 --- a/test/test_once.cpp +++ b/test/test_once.cpp @@ -33,7 +33,7 @@ void call_once_thread() int my_once_value=0; for(unsigned i=0;i