Ind.ie is now Small Technology Foundation.
Commit 3ec4605d authored by Stefan van den Oord's avatar Stefan van den Oord

Fixed compiler warnings

parent 17f4d5b0
......@@ -239,7 +239,7 @@ class AnnouncementTests: QuickSpec {
it("cannot read announcement with incorrect magic") {
var bytes = XdrWriter().write(someAnnouncementWithExtraDevices).xdrBytes
bytes[0]++
bytes[0] = bytes[0] + 1
let reader = XdrReader(xdrBytes:bytes)
let a = reader.read(Announcement.self)
expect(a).to(beNil())
......
......@@ -497,7 +497,7 @@ class GreeterTests : QuickSpec {
greeter1.announcementInterval = 1
greeter1.delegate = GreeterTestDelegate(onReceiveAnnouncement: { (announcement) -> () in
receivedAnnouncement1 = announcement
receivedCount1++
receivedCount1 = receivedCount1 + 1
})
let greeter2 = Greeter(deviceId: self.deviceId2)
......@@ -508,7 +508,7 @@ class GreeterTests : QuickSpec {
greeter2.announcementInterval = 1
greeter2.delegate = GreeterTestDelegate(onReceiveAnnouncement: { (announcement) -> () in
receivedAnnouncement2 = announcement
receivedCount2++
receivedCount2 = receivedCount2 + 1
})
greeter1.start()
......
......@@ -11,7 +11,7 @@ class QueryTests : QuickSpec {
describe("Basics") {
it("can construct a query record") {
let q = Query(deviceId:deviceId1)
expect(q.deviceId == deviceId1)
expect(q.deviceId) == deviceId1
}
it("has magic") {
......@@ -36,7 +36,7 @@ class QueryTests : QuickSpec {
it("cannot read Query with incorrect magic") {
var xdrBytes = XdrWriter().write(query).xdrBytes
xdrBytes[0]++
xdrBytes[0] = xdrBytes[0] + 1
let reader = XdrReader(xdrBytes: xdrBytes)
let q = reader.read(Query.self)
expect(q).to(beNil())
......
......@@ -9,7 +9,7 @@ class UDPSocketStub: UdpSocketSpy {
writer.write(announcement)
let data = NSData(bytes: writer.xdrBytes, length:writer.xdrBytes.count)
let addr = NSData()
let d : GCDAsyncUdpSocketDelegate? = self.delegate() as? GCDAsyncUdpSocketDelegate
let d = self.delegate()
d!.udpSocket!(self, didReceiveData: data, fromAddress: addr, withFilterContext: nil)
}
......
......@@ -31,7 +31,7 @@ class UdpSocketSpy : GCDAsyncUdpSocket {
lastToHost = host
lastToPort = port
sentData = data
++sentCount
sentCount = sentCount + 1
}
override func beginReceiving() throws {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment