diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-06-04 14:31:42 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-06-05 06:06:27 -0700 |
commit | 0b15f800126cca6c90183e8a13d26d2504c4461f (patch) | |
tree | ccd29ff3f1a80989affe3a7c8878e1477470a77e /meta-oe | |
parent | 623b4747d1201d8ed6732fc2e6dbfadb081ceddd (diff) | |
download | meta-openembedded-contrib-0b15f800126cca6c90183e8a13d26d2504c4461f.tar.gz |
tbb: Fix warnings with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-support/tbb/tbb/0001-arena-Remove-dead-code.patch | 40 | ||||
-rw-r--r-- | meta-oe/recipes-support/tbb/tbb_2021.2.0.bb | 1 |
2 files changed, 41 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/tbb/tbb/0001-arena-Remove-dead-code.patch b/meta-oe/recipes-support/tbb/tbb/0001-arena-Remove-dead-code.patch new file mode 100644 index 0000000000..8a603ffe30 --- /dev/null +++ b/meta-oe/recipes-support/tbb/tbb/0001-arena-Remove-dead-code.patch @@ -0,0 +1,40 @@ +From b94a1e3d6b5c733ba24cfa0d35450d8659d48289 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 4 Jun 2021 13:07:28 -0700 +Subject: [PATCH] arena: Remove dead code + +Fixes clang warning +arena.cpp:226:19: error: variable 'drained' set b +ut not used [-Werror,-Wunused-but-set-variable] +| std::intptr_t drained = 0; +| ^ + +Upstream-Status: Submitted [https://github.com/oneapi-src/oneTBB/pull/429] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/tbb/arena.cpp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/tbb/arena.cpp b/src/tbb/arena.cpp +index 4a9c0f8a..c8ed4999 100644 +--- a/src/tbb/arena.cpp ++++ b/src/tbb/arena.cpp +@@ -232,14 +232,13 @@ void arena::free_arena () { + __TBB_ASSERT( !my_global_concurrency_mode, NULL ); + #endif + poison_value( my_guard ); +- std::intptr_t drained = 0; + for ( unsigned i = 0; i < my_num_slots; ++i ) { + // __TBB_ASSERT( !my_slots[i].my_scheduler, "arena slot is not empty" ); + // TODO: understand the assertion and modify + // __TBB_ASSERT( my_slots[i].task_pool == EmptyTaskPool, NULL ); + __TBB_ASSERT( my_slots[i].head == my_slots[i].tail, NULL ); // TODO: replace by is_quiescent_local_task_pool_empty + my_slots[i].free_task_pool(); +- drained += mailbox(i).drain(); ++ mailbox(i).drain(); + my_slots[i].my_default_task_dispatcher->~task_dispatcher(); + } + __TBB_ASSERT(my_fifo_task_stream.empty(), "Not all enqueued tasks were executed"); +-- +2.31.1 + diff --git a/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb b/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb index f4c52daf41..0b039a181a 100644 --- a/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb +++ b/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb @@ -19,6 +19,7 @@ SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH file://0001-CMakeLists.txt-exclude-riscv64-riscv32.patch \ file://0001-Disable-use-of-_tpause-instruction.patch \ file://0001-set_my_tls_end_of_input-Use-an-arbitrary-but-valid-p.patch \ + file://0001-arena-Remove-dead-code.patch \ " S = "${WORKDIR}/git" |