Skip to content

Commit

Permalink
Merge pull request #1750 from ably/xcode-14.3
Browse files Browse the repository at this point in the history
Fix compilation errors in Xcode 14.3
  • Loading branch information
lawrence-forooghian authored May 15, 2023
2 parents eace43c + 3f0307b commit eff260a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Source/ARTTypes.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ NSTimeInterval millisecondsToTimeInterval(uint64_t msecs) {
return ((NSTimeInterval)msecs) / 1000;
}

NSString *generateNonce() {
NSString *generateNonce(void) {
// Generate two random numbers up to 8 digits long and concatenate them to produce a 16 digit random number
NSUInteger r1 = arc4random_uniform(100000000);
NSUInteger r2 = arc4random_uniform(100000000);
Expand Down
2 changes: 1 addition & 1 deletion Source/SocketRocket/ARTSRWebSocket.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#error SocketRocket must be compiled with ARC enabled
#endif

__attribute__((used)) static void importCategories()
__attribute__((used)) static void importCategories(void)
{
import_NSURLRequest_ARTSRWebSocket();
import_NSRunLoop_ARTSRWebSocket();
Expand Down
2 changes: 1 addition & 1 deletion Source/SocketRocket/NSRunLoop+ARTSRWebSocket.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#import "ARTSRRunLoopThread.h"

// Required for object file to always be linked.
void import_NSRunLoop_ARTSRWebSocket() { }
void import_NSRunLoop_ARTSRWebSocket(void) { }

@implementation NSRunLoop (ARTSRWebSocket)

Expand Down
2 changes: 1 addition & 1 deletion Source/SocketRocket/NSURLRequest+ARTSRWebSocket.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#import "NSURLRequest+ARTSRWebSocketPrivate.h"

// Required for object file to always be linked.
void import_NSURLRequest_ARTSRWebSocket() { }
void import_NSURLRequest_ARTSRWebSocket(void) { }

NS_ASSUME_NONNULL_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion Test/Tests/RealtimeClientChannelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2816,7 +2816,7 @@ class RealtimeClientChannelTests: XCTestCase {
channelOne.publish("i", data: ["expectedBundle": 5], clientId: "bar")
channelOne.publish("j", data: ["expectedBundle": 6])
// RTL6d1
channelOne.publish("k", data: ["expectedBundle": 7, "moreData": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"])
channelOne.publish("k", data: ["expectedBundle": 7, "moreData": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"] as [String : Any])
channelOne.publish("l", data: ["expectedBundle": 8])
// RTL6d7
channelOne.publish([ARTMessage(id: "bundle_m", name: "m", data: ["expectedBundle": 9])])
Expand Down
4 changes: 2 additions & 2 deletions Test/Tests/UtilitiesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ class UtilitiesTests: XCTestCase {
func test__001__Utilities__JSON_Encoder__should_decode_a_protocol_message_that_has_an_error_without_a_message() throws {
beforeEach__Utilities__JSON_Encoder()

let jsonObject: NSDictionary = [
let jsonObject: [String : Any] = [
"action": 9,
"error": [
"code": 40142,
"statusCode": "401",
],
] as [String : Any],
]
let data = try JSONSerialization.data(withJSONObject: jsonObject, options: [])
guard let protocolMessage = try? jsonEncoder.decodeProtocolMessage(data) else {
Expand Down

0 comments on commit eff260a

Please sign in to comment.