From 513ab4ff9cd971480146fb29d20f6d3927f8eee6 Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Fri, 25 Mar 2022 15:35:24 -0700 Subject: [PATCH] Fix 'variable set but not used` warning/error Yes, some compilers complain about this. --- src/runtime/synchronization_common.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/runtime/synchronization_common.h b/src/runtime/synchronization_common.h index 5876ed1c3d57..4a7eb428fe03 100644 --- a/src/runtime/synchronization_common.h +++ b/src/runtime/synchronization_common.h @@ -381,14 +381,12 @@ WEAK void word_lock::unlock_full() { word_lock_queue_data *head = (word_lock_queue_data *)(expected & ~(uintptr_t)(queue_lock_bit | lock_bit)); word_lock_queue_data *current = head; word_lock_queue_data *tail = current->tail; - int times_through = 0; while (tail == nullptr) { word_lock_queue_data *next = current->next; halide_abort_if_false(nullptr, next != nullptr); next->prev = current; current = next; tail = current->tail; - times_through++; } head->tail = tail;