Skip to content

Commit 7efdd76

Browse files
authored
Merge pull request #830 from swiftlang/android/6pick
[release/6.0] Testing: add some force unwraps for Android
2 parents 5e6c8a6 + eaa9dac commit 7efdd76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/Testing/Support/FileHandle.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ extension FileHandle {
257257
try withUnsafeCFILEHandle { file in
258258
try withUnsafeTemporaryAllocation(byteCount: 1024, alignment: 1) { buffer in
259259
repeat {
260-
let countRead = fread(buffer.baseAddress, 1, buffer.count, file)
260+
let countRead = fread(buffer.baseAddress!, 1, buffer.count, file)
261261
if 0 != ferror(file) {
262262
throw CError(rawValue: swt_errno())
263263
}
@@ -295,7 +295,7 @@ extension FileHandle {
295295
}
296296
}
297297

298-
let countWritten = fwrite(bytes.baseAddress, MemoryLayout<UInt8>.stride, bytes.count, file)
298+
let countWritten = fwrite(bytes.baseAddress!, MemoryLayout<UInt8>.stride, bytes.count, file)
299299
if countWritten < bytes.count {
300300
throw CError(rawValue: swt_errno())
301301
}

0 commit comments

Comments
 (0)