Skip to content

Commit

Permalink
Suppress some deprecated warnings for the time being.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasvl committed Nov 27, 2023
1 parent 8120679 commit 83cac39
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions AppKit/GTMNSAnimation+Duration.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@

#import "GTMNSAnimation+Duration.h"

// Suppress some of the warning for key/mask constants.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"

const NSUInteger kGTMLeftMouseUpAndKeyDownMask
= NSLeftMouseUpMask | NSKeyDownMask;

Expand Down Expand Up @@ -52,6 +56,8 @@ NSTimeInterval GTMModifyDurationBasedOnCurrentState(NSTimeInterval duration,
return duration;
}

#pragma clang diagnostic pop

@implementation NSAnimation (GTMNSAnimationDurationAdditions)

- (id)gtm_initWithDuration:(NSTimeInterval)duration
Expand Down
6 changes: 6 additions & 0 deletions Foundation/GTMLogger+ASL.m
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ - (instancetype)init {
return [self initWithFacility:nil];
}

// Disable warnings for the asl_* apis.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"

- (instancetype)initWithFacility:(NSString *)facility {
if ((self = [super init])) {
client_ = asl_open(NULL, [facility UTF8String], 0);
Expand Down Expand Up @@ -183,4 +187,6 @@ - (void)log:(NSString *)msg level:(int)level {
}
// COV_NF_END

#pragma clang diagnostic pop

@end // GTMLoggerASLClient
3 changes: 3 additions & 0 deletions Foundation/GTMNSObject+KeyValueObserving.m
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,14 @@ + (instancetype)defaultCenter {
// and the other will set things up so that the failing thread
// gets the shared center
GTMKeyValueObservingCenter *newCenter = [[self alloc] init];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if(!OSAtomicCompareAndSwapPtrBarrier(NULL,
newCenter,
(void *)&center)) {
[newCenter release]; // COV_NF_LINE no guarantee we'll hit this line
}
#pragma clang diagnostic pop
}
return center;
}
Expand Down

0 comments on commit 83cac39

Please sign in to comment.