Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation errors in Xcode 14.3 #1750

Merged
merged 2 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
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
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