Skip to content

Commit

Permalink
Merge pull request #189 from jszumski/xcode15
Browse files Browse the repository at this point in the history
Fix warnings in Xcode 15
  • Loading branch information
tcamin authored Sep 27, 2023
2 parents 4262ed2 + 3bddaea commit 8a480d7
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 16 deletions.
1 change: 1 addition & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import PackageDescription

let package = Package(
name: "SBTUITestTunnel",
platforms: [.iOS(.v12), .tvOS(.v12)],
products: [
.library(
name: "SBTUITestTunnelServer",
Expand Down
4 changes: 2 additions & 2 deletions SBTUITestTunnelClient.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Pod::Spec.new do |s|
s.author = { "Tomas Camin" => "[email protected]" }
s.source = { :git => "https://github.com/Subito-it/SBTUITestTunnel.git", :tag => s.version.to_s }

s.ios.deployment_target = "11.0"
s.tvos.deployment_target = "11.0"
s.ios.deployment_target = "12.0"
s.tvos.deployment_target = "12.0"
s.swift_version = "5.0"
s.requires_arc = true
s.xcconfig = { "OTHER_LDFLAGS" => "-ObjC" }
Expand Down
4 changes: 2 additions & 2 deletions SBTUITestTunnelCommon.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Pod::Spec.new do |s|
s.author = { "Tomas Camin" => "[email protected]" }
s.source = { :git => "https://github.com/Subito-it/SBTUITestTunnel.git", :tag => s.version.to_s }

s.ios.deployment_target = "11.0"
s.tvos.deployment_target = "11.0"
s.ios.deployment_target = "12.0"
s.tvos.deployment_target = "12.0"
s.swift_version = "5.0"
s.xcconfig = { "OTHER_LDFLAGS" => "-ObjC" }
s.pod_target_xcconfig = { :prebuild_configuration => "debug" }
Expand Down
4 changes: 2 additions & 2 deletions SBTUITestTunnelServer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Pod::Spec.new do |s|
s.author = { "Tomas Camin" => "[email protected]" }
s.source = { :git => "https://github.com/Subito-it/SBTUITestTunnel.git", :tag => s.version.to_s }

s.ios.deployment_target = "11.0"
s.tvos.deployment_target = "11.0"
s.ios.deployment_target = "12.0"
s.tvos.deployment_target = "12.0"
s.swift_version = "5.0"
s.requires_arc = true
s.xcconfig = { "OTHER_LDFLAGS" => "-ObjC" }
Expand Down
6 changes: 3 additions & 3 deletions Sources/SBTUITestTunnelCommon/DetoxIPC/_DTXIPCDistantObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ - (void)forwardInvocation:(NSInvocation *)invocation

if(didEndWaiting)
{
pthread_mutex_lock_deferred_unlock(&_pendingMutex);
pthread_mutex_lock_deferred_unlock(&self->_pendingMutex);
[_pendingRemoteBlocks enumerateObjectsUsingBlock:^(_DTXIPCExportedObject * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
[obj invoke];
}];
Expand Down Expand Up @@ -149,8 +149,8 @@ - (BOOL)_enqueueSynchronousExportedObjectInvocation:(_DTXIPCExportedObject*)obje
{
return NO;
}
pthread_mutex_lock_deferred_unlock(&_pendingMutex);

pthread_mutex_lock_deferred_unlock(&self->_pendingMutex);
[_pendingRemoteBlocks addObject:object];

return YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,7 @@ static id _encodeObject(id object, _DTXIPCDistantObject* distantObject)

encodedObj[@"type"] = @"object";
encodedObj[@"className"] = NSStringFromClass(cls);
if (@available(iOS 11.0, *)) {
encodedObj[@"data"] = [NSKeyedArchiver archivedDataWithRootObject:object requiringSecureCoding:NO error:NULL];
} else {
encodedObj[@"data"] = [NSKeyedArchiver archivedDataWithRootObject:object error:NULL];
}
encodedObj[@"data"] = [NSKeyedArchiver archivedDataWithRootObject:object requiringSecureCoding:NO error:NULL];
}

return encodedObj;
Expand Down Expand Up @@ -303,7 +299,7 @@ static id _decodeObject(NSDictionary* encodedObj, DTXIPCConnection* connection)
}
else
{
NSKeyedUnarchiver* unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:encodedObj[@"data"]];
NSKeyedUnarchiver* unarchiver = [[NSKeyedUnarchiver alloc] initForReadingFromData:encodedObj[@"data"] error:NULL];
unarchiver.requiresSecureCoding = NO;
rv = [unarchiver decodeObjectForKey:NSKeyedArchiveRootObjectKey];
[unarchiver release];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#import "SBTSwizzleHelpers.h"
#import "SBTUITestTunnel.h"
#import "SBTIPCTunnel.h"
#import "SBTActiveStub.h"

#ifdef SPM
#import "../DetoxIPC/DTXIPCConnection.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
static dispatch_queue_t _dateFormatterQueue = NULL;

// TODO: Handle RFC 850 and ANSI C's asctime() format
void SBTWebServerInitializeFunctions() {
void SBTWebServerInitializeFunctions(void) {
GWS_DCHECK([NSThread isMainThread]); // NSDateFormatter should be initialized on main thread
if (_dateFormatterRFC822 == nil) {
_dateFormatterRFC822 = [[NSDateFormatter alloc] init];
Expand Down

0 comments on commit 8a480d7

Please sign in to comment.