Skip to content

Commit c7efa1b

Browse files
committed
Targeting macOS 10.10 minimum required additional ARC fixes
1 parent c19af2b commit c7efa1b

File tree

5 files changed

+11
-20
lines changed

5 files changed

+11
-20
lines changed

Desktop/Classes/LoggerConnection.m

+4-10
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,6 @@ - (id)initWithAddress:(NSData *)anAddress
6767
return self;
6868
}
6969

70-
- (void)dealloc
71-
{
72-
dispatch_release(_messageProcessingQueue);
73-
}
74-
7570
- (BOOL)isNewRunOfClient:(LoggerConnection *)aConnection
7671
{
7772
// Try to detect if a connection is a new run of an older, disconnected session
@@ -126,16 +121,16 @@ - (BOOL)isNewRunOfClient:(LoggerConnection *)aConnection
126121
if (addrSize == sizeof(struct sockaddr_in))
127122
{
128123
struct sockaddr_in addra, addrb;
129-
[_clientAddress getBytes:&addra];
130-
[aConnection.clientAddress getBytes:&addrb];
124+
[_clientAddress getBytes:&addra length:addrSize];
125+
[aConnection.clientAddress getBytes:&addrb length:MIN([aConnection.clientAddress length], sizeof(addrb))];
131126
if (memcmp(&addra.sin_addr, &addrb.sin_addr, sizeof(addra.sin_addr)))
132127
return NO;
133128
}
134129
else if (addrSize == sizeof(struct sockaddr_in6))
135130
{
136131
struct sockaddr_in6 addr6a, addr6b;
137-
[_clientAddress getBytes:&addr6a];
138-
[aConnection.clientAddress getBytes:&addr6b];
132+
[_clientAddress getBytes:&addr6a length:addrSize];
133+
[aConnection.clientAddress getBytes:&addr6b length:MIN([aConnection.clientAddress length], sizeof(addr6b))];
139134
if (memcmp(&addr6a.sin6_addr, &addr6b.sin6_addr, sizeof(addr6a.sin6_addr)))
140135
return NO;
141136
}
@@ -205,7 +200,6 @@ - (void)clearMessages
205200
{
206201
// Clear the backlog of _messages, only keeping the top (client info) message
207202
// This MUST be called on the _messageProcessingQueue
208-
assert(dispatch_get_current_queue() == _messageProcessingQueue);
209203
if (![_messages count])
210204
return;
211205

Desktop/Classes/LoggerDetailsWindowController.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
@property (nonatomic, retain) IBOutlet NSTextView *detailsView;
3636
@property (nonatomic, retain) IBOutlet NSTextField *detailsInfo;
3737
@property (nonatomic, retain) IBOutlet NSProgressIndicator *progressIndicator;
38-
@property (nonatomic, assign) dispatch_queue_t detailsQueue;
38+
@property (nonatomic, retain) dispatch_queue_t detailsQueue;
3939

4040
- (void)setMessages:(NSArray *)messages;
4141

Desktop/Classes/LoggerWindowController.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282

8383
@property (nonatomic, assign) CGFloat threadColumnWidth;
8484

85-
@property (nonatomic, assign) dispatch_queue_t messageFilteringQueue;
86-
@property (nonatomic, assign) dispatch_group_t lastTilingGroup;
85+
@property (nonatomic, retain) dispatch_queue_t messageFilteringQueue;
86+
@property (nonatomic, retain) dispatch_group_t lastTilingGroup;
8787

8888
- (IBAction)openDetailsWindow:(id)sender;
8989

Desktop/Classes/LoggerWindowController.m

-5
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ - (void)dealloc
9090
[_filterSetsListController removeObserver:self forKeyPath:@"arrangedObjects"];
9191
[_filterSetsListController removeObserver:self forKeyPath:@"selectedObjects"];
9292
[_filterListController removeObserver:self forKeyPath:@"selectedObjects"];
93-
dispatch_release(_messageFilteringQueue);
94-
if (_lastTilingGroup != NULL)
95-
dispatch_release(_lastTilingGroup);
9693

9794
_logTable.delegate = nil;
9895
_logTable.dataSource = nil;
@@ -273,7 +270,6 @@ - (void)cancelAsynchronousTiling
273270
// by clearing the context, all further tasks on this group will cancel their work
274271
// wait until they all went through cancellation before removing the group
275272
dispatch_group_wait(leaveGroup, 0);
276-
dispatch_release(leaveGroup);
277273
});
278274
}
279275
_lastTilingGroup = NULL;
@@ -1085,7 +1081,6 @@ - (void)setAttachedConnection:(LoggerConnection *)aConnection
10851081
if (_lastTilingGroup != NULL)
10861082
{
10871083
dispatch_set_context(_lastTilingGroup, NULL);
1088-
dispatch_release(_lastTilingGroup);
10891084
_lastTilingGroup = NULL;
10901085
}
10911086

Desktop/NSLoggerViewer.xcodeproj/project.pbxproj

+4-2
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@
649649
CODE_SIGN_STYLE = Automatic;
650650
COMBINE_HIDPI_IMAGES = YES;
651651
COPY_PHASE_STRIP = NO;
652-
DEVELOPMENT_TEAM = ETK7NXHU9M;
652+
DEVELOPMENT_TEAM = K42G4S78CE;
653653
FRAMEWORK_SEARCH_PATHS = (
654654
"$(inherited)",
655655
"\"$(SRCROOT)/Third Party/HockeySDK-Mac\"",
@@ -661,6 +661,7 @@
661661
HEADER_SEARCH_PATHS = "\"Third Party/BWToolkit\"";
662662
INFOPLIST_FILE = Info.plist;
663663
INSTALL_PATH = "$(HOME)/Applications";
664+
MACOSX_DEPLOYMENT_TARGET = 10.10;
664665
PRODUCT_BUNDLE_IDENTIFIER = com.florentpillet.NSLogger;
665666
PRODUCT_NAME = NSLogger;
666667
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -677,7 +678,7 @@
677678
CODE_SIGN_STYLE = Automatic;
678679
COMBINE_HIDPI_IMAGES = YES;
679680
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
680-
DEVELOPMENT_TEAM = ETK7NXHU9M;
681+
DEVELOPMENT_TEAM = K42G4S78CE;
681682
FRAMEWORK_SEARCH_PATHS = (
682683
"$(inherited)",
683684
"\"$(SRCROOT)/Third Party/HockeySDK-Mac\"",
@@ -687,6 +688,7 @@
687688
HEADER_SEARCH_PATHS = "\"Third Party/BWToolkit\"";
688689
INFOPLIST_FILE = Info.plist;
689690
INSTALL_PATH = "$(HOME)/Applications";
691+
MACOSX_DEPLOYMENT_TARGET = 10.10;
690692
PRODUCT_BUNDLE_IDENTIFIER = com.florentpillet.NSLogger;
691693
PRODUCT_NAME = NSLogger;
692694
PROVISIONING_PROFILE_SPECIFIER = "";

0 commit comments

Comments
 (0)