Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Fixing compilation warnings #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Source/WebSocket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ private class InnerWebSocket: Hashable {
security = .none
}

var path = CFURLCopyPath(req.url! as CFURL!) as String
var path = CFURLCopyPath(req.url! as CFURL) as String
if path == "" {
path = "/"
}
Expand Down Expand Up @@ -1058,7 +1058,7 @@ private class InnerWebSocket: Hashable {
var (rdo, wro) : (InputStream?, OutputStream?)
var readStream: Unmanaged<CFReadStream>?
var writeStream: Unmanaged<CFWriteStream>?
CFStreamCreatePairWithSocketToHost(nil, addr[0] as CFString!, UInt32(Int(addr[1])!), &readStream, &writeStream);
CFStreamCreatePairWithSocketToHost(nil, addr[0] as CFString, UInt32(Int(addr[1])!), &readStream, &writeStream);
rdo = readStream!.takeRetainedValue()
wro = writeStream!.takeRetainedValue()
(rd, wr) = (rdo!, wro!)
Expand Down Expand Up @@ -1144,8 +1144,8 @@ private class InnerWebSocket: Hashable {
} else {
key = ""
if let r = line.range(of: ":") {
key = trim(line.substring(to: r.lowerBound))
value = trim(line.substring(from: r.upperBound))
key = trim(String(line[..<r.lowerBound]))
value = trim(String(line[r.upperBound...]))
}
}

Expand Down