Index: src/threading.h ================================================================== --- src/threading.h +++ src/threading.h @@ -202,11 +202,13 @@ static OF_INLINE bool of_spinlock_lock(of_spinlock_t *spinlock) { #if defined(OF_HAVE_ATOMIC_OPS) # if defined(OF_HAVE_SCHED_YIELD) || defined(OF_WINDOWS) - for (size_t i = 0; i < OF_SPINCOUNT; i++) + size_t i; + + for (i = 0; i < OF_SPINCOUNT; i++) if (of_spinlock_trylock(spinlock)) return true; while (!of_spinlock_trylock(spinlock)) # ifndef OF_WINDOWS