From 75059c46d645e42e8da31fb97d003047c67b004b Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Fri, 9 Jul 2021 13:59:09 -0400 Subject: thread_worker: Fix compile time error state is unused in the branch where with_state is false --- src/common/thread_worker.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/thread_worker.h') diff --git a/src/common/thread_worker.h b/src/common/thread_worker.h index 8272985ff..0a975a869 100644 --- a/src/common/thread_worker.h +++ b/src/common/thread_worker.h @@ -39,7 +39,7 @@ public: const auto lambda = [this, func](std::stop_token stop_token) { Common::SetCurrentThreadName(thread_name.c_str()); { - std::conditional_t state{func()}; + [[maybe_unused]] std::conditional_t state{func()}; while (!stop_token.stop_requested()) { Task task; { -- cgit v1.2.3