Skip to content

Commit 3bb1a1b

Browse files
authored
Merge pull request swiftlang#301 from benlangmuir/warning-nil-strerror
[gardening] Fix warning about strerror return value
2 parents 2852ce3 + f50ce7a commit 3bb1a1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/sourcekit-lsp/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ do {
120120
// will not break our connection stream.
121121
let realStdout = dup(STDOUT_FILENO)
122122
if realStdout == -1 {
123-
fatalError("failed to dup stdout: \(strerror(errno))")
123+
fatalError("failed to dup stdout: \(strerror(errno)!)")
124124
}
125125
if dup2(STDERR_FILENO, STDOUT_FILENO) == -1 {
126-
fatalError("failed to redirect stdout -> stderr: \(strerror(errno))")
126+
fatalError("failed to redirect stdout -> stderr: \(strerror(errno)!)")
127127
}
128128

129129
let clientConnection = JSONRPCConnection(

0 commit comments

Comments
 (0)