diff options
Diffstat (limited to 'src/support')
-rw-r--r-- | src/support/threads.cpp | 3 | ||||
-rw-r--r-- | src/support/threads.h | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/support/threads.cpp b/src/support/threads.cpp index ab9de4175..bd026b69c 100644 --- a/src/support/threads.cpp +++ b/src/support/threads.cpp @@ -216,8 +216,7 @@ void ThreadPool::notifyThreadIsReady() { void ThreadPool::resetThreadsAreReady() { DEBUG_POOL("reset threads are ready\n";) - auto old = ready.exchange(0); - WASM_UNUSED(old); + [[maybe_unused]] auto old = ready.exchange(0); assert(old == threads.size()); } diff --git a/src/support/threads.h b/src/support/threads.h index 8a04f78bd..ca13abf4e 100644 --- a/src/support/threads.h +++ b/src/support/threads.h @@ -22,6 +22,7 @@ #define wasm_support_threads_h #include <atomic> +#include <cassert> #include <condition_variable> #include <functional> #include <memory> @@ -125,8 +126,7 @@ public: OnlyOnce() { created.store(0); } void verify() { - auto before = created.fetch_add(1); - WASM_UNUSED(before); + [[maybe_unused]] auto before = created.fetch_add(1); assert(before == 0); } }; |