From: David Wells Date: Fri, 2 Mar 2018 19:25:51 +0000 (-0500) Subject: Silence some TBB warnings. X-Git-Tag: v9.0.0-rc1~274^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5989%2Fhead;p=dealii.git Silence some TBB warnings. dynamic_link_descriptor has another field on most platforms: compilers complain if it is not initialized. There are a lot of fallthrough warnings: I simply disabled them. --- diff --git a/bundled/tbb-2018_U2/src/CMakeLists.txt b/bundled/tbb-2018_U2/src/CMakeLists.txt index c86e8f935b..ff717f1a24 100644 --- a/bundled/tbb-2018_U2/src/CMakeLists.txt +++ b/bundled/tbb-2018_U2/src/CMakeLists.txt @@ -33,6 +33,11 @@ STRIP_FLAG(DEAL_II_CXX_FLAGS "-pedantic") # ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-flifetime-dse=1") +# +# Disable all fallthrough warnings: +# +ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wimplicit-fallthrough=0") + SET(CMAKE_INCLUDE_CURRENT_DIR TRUE) INCLUDE_DIRECTORIES( ${THREADS_BUNDLED_INCLUDE_DIRS} diff --git a/bundled/tbb-2018_U2/src/tbb/arena.cpp b/bundled/tbb-2018_U2/src/tbb/arena.cpp index 70ad17583c..c994a1ff29 100644 --- a/bundled/tbb-2018_U2/src/tbb/arena.cpp +++ b/bundled/tbb-2018_U2/src/tbb/arena.cpp @@ -981,6 +981,7 @@ public: }; void isolate_within_arena( delegate_base& d, intptr_t reserved ) { + (void)reserved; __TBB_ASSERT( reserved == 0, NULL ); // TODO: Decide what to do if the scheduler is not initialized. Is there a use case for it? generic_scheduler* s = governor::local_scheduler_weak(); diff --git a/bundled/tbb-2018_U2/src/tbb/governor.cpp b/bundled/tbb-2018_U2/src/tbb/governor.cpp index b492e8ac74..bb3272ebca 100644 --- a/bundled/tbb-2018_U2/src/tbb/governor.cpp +++ b/bundled/tbb-2018_U2/src/tbb/governor.cpp @@ -52,7 +52,12 @@ static __cilk_tbb_retcode (*watch_stack_handler)(struct __cilk_tbb_unwatch_thunk //! Table describing how to link the handlers. static const dynamic_link_descriptor CilkLinkTable[] = { - { "__cilkrts_watch_stack", (pointer_to_handler*)(void*)(&watch_stack_handler) } + { "__cilkrts_watch_stack", (pointer_to_handler*)(void*)(&watch_stack_handler) +#if __TBB_WEAK_SYMBOLS_PRESENT + , + nullptr +#endif + } }; static atomic cilkrts_load_state; @@ -204,7 +209,7 @@ generic_scheduler* governor::init_scheduler( int num_threads, stack_size_type st return s; } -bool governor::terminate_scheduler( generic_scheduler* s, const task_scheduler_init* tsi_ptr, bool blocking ) { +bool governor::terminate_scheduler( generic_scheduler* s, const task_scheduler_init* /*tsi_ptr*/, bool blocking ) { bool ok = false; __TBB_ASSERT( is_set(s), "Attempt to terminate non-local scheduler instance" ); if (0 == --(s->my_ref_count)) { diff --git a/bundled/tbb-2018_U2/src/tbb/tbb_misc_ex.cpp b/bundled/tbb-2018_U2/src/tbb/tbb_misc_ex.cpp index 264abe6aef..631ede499e 100644 --- a/bundled/tbb-2018_U2/src/tbb/tbb_misc_ex.cpp +++ b/bundled/tbb-2018_U2/src/tbb/tbb_misc_ex.cpp @@ -61,7 +61,12 @@ namespace internal { static int (*libiomp_try_restoring_original_mask)(); // Table for mapping to libiomp entry points static const dynamic_link_descriptor iompLinkTable[] = { - { "kmp_set_thread_affinity_mask_initial", (pointer_to_handler*)(void*)(&libiomp_try_restoring_original_mask) } + { "kmp_set_thread_affinity_mask_initial", (pointer_to_handler*)(void*)(&libiomp_try_restoring_original_mask) +#if __TBB_WEAK_SYMBOLS_PRESENT + , + nullptr +#endif + } }; #endif