mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
stdlib: Address StrictMemorySafety warnings in KeyPath related code.
This commit is contained in:
@@ -252,7 +252,7 @@ fileprivate class _Lock {
|
||||
|
||||
init() {
|
||||
#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS) || os(visionOS)
|
||||
self.underlying = UnsafeMutablePointer.allocate(capacity: 1)
|
||||
unsafe self.underlying = UnsafeMutablePointer.allocate(capacity: 1)
|
||||
unsafe self.underlying.initialize(to: os_unfair_lock())
|
||||
#elseif os(Windows)
|
||||
self.underlying = UnsafeMutablePointer.allocate(capacity: 1)
|
||||
|
||||
Reference in New Issue
Block a user