stdlib: Address StrictMemorySafety warnings in KeyPath related code.

This commit is contained in:
Allan Shortlidge
2025-03-31 15:46:46 -07:00
parent 60e66f3613
commit dbd3d40c07
3 changed files with 29 additions and 29 deletions

View File

@@ -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)