Skip to content

Commit 301961d

Browse files
committed
NSLock: fix warnings on macOS
1 parent bafd8c2 commit 301961d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Foundation/NSLock.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,12 @@ private func timeSpecFrom(date: Date) -> timespec? {
303303

304304
private func deallocateTimedLockData(cond: _PthreadCondPointer, mutex: _PthreadMutexPointer) {
305305
pthread_cond_destroy(cond)
306-
cond.deinitialize()
307-
cond.deallocate(capacity: 1)
306+
cond.deinitialize(count: 1)
307+
cond.deallocate()
308308

309309
pthread_mutex_destroy(mutex)
310-
mutex.deinitialize()
311-
mutex.deallocate(capacity: 1)
310+
mutex.deinitialize(count: 1)
311+
mutex.deallocate()
312312
}
313313

314314
// Emulate pthread_mutex_timedlock using pthread_cond_timedwait.

0 commit comments

Comments
 (0)