]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Silence some TBB warnings. 5989/head
authorDavid Wells <wellsd2@rpi.edu>
Fri, 2 Mar 2018 19:25:51 +0000 (14:25 -0500)
committerDavid Wells <wellsd2@rpi.edu>
Fri, 2 Mar 2018 20:51:59 +0000 (15:51 -0500)
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.

bundled/tbb-2018_U2/src/CMakeLists.txt
bundled/tbb-2018_U2/src/tbb/arena.cpp
bundled/tbb-2018_U2/src/tbb/governor.cpp
bundled/tbb-2018_U2/src/tbb/tbb_misc_ex.cpp

index c86e8f935bf6e40fa233a808f0a204a3c8446fc0..ff717f1a240beb079a53c637b37c3690f07ddabc 100644 (file)
@@ -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}
index 70ad17583c9f236bf825569004b1ecc8a151137b..c994a1ff2979255c81e555dcb4a1ef6dafede11c 100644 (file)
@@ -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();
index b492e8ac74342ee8e0ab1f17142df9553bfbdcde..bb3272ebca81359e6f0ccb6df89d64fc44f7bcfe 100644 (file)
@@ -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<do_once_state> 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)) {
index 264abe6aef484cd9b8538f170d7d1f0c8e35270d..631ede499e8cc5df3cf3efc1a3865c185da3bd4d 100644 (file)
@@ -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
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.