From 83cac397e38d204344584599b202aebc61fbcadb Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Mon, 27 Nov 2023 16:09:16 -0500 Subject: [PATCH] Suppress some deprecated warnings for the time being. --- AppKit/GTMNSAnimation+Duration.m | 6 ++++++ Foundation/GTMLogger+ASL.m | 6 ++++++ Foundation/GTMNSObject+KeyValueObserving.m | 3 +++ 3 files changed, 15 insertions(+) diff --git a/AppKit/GTMNSAnimation+Duration.m b/AppKit/GTMNSAnimation+Duration.m index 56c1f5b..80d6a3a 100644 --- a/AppKit/GTMNSAnimation+Duration.m +++ b/AppKit/GTMNSAnimation+Duration.m @@ -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; @@ -52,6 +56,8 @@ NSTimeInterval GTMModifyDurationBasedOnCurrentState(NSTimeInterval duration, return duration; } +#pragma clang diagnostic pop + @implementation NSAnimation (GTMNSAnimationDurationAdditions) - (id)gtm_initWithDuration:(NSTimeInterval)duration diff --git a/Foundation/GTMLogger+ASL.m b/Foundation/GTMLogger+ASL.m index d0f8a89..ece7eaa 100644 --- a/Foundation/GTMLogger+ASL.m +++ b/Foundation/GTMLogger+ASL.m @@ -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); @@ -183,4 +187,6 @@ - (void)log:(NSString *)msg level:(int)level { } // COV_NF_END +#pragma clang diagnostic pop + @end // GTMLoggerASLClient diff --git a/Foundation/GTMNSObject+KeyValueObserving.m b/Foundation/GTMNSObject+KeyValueObserving.m index 679dda8..3ff0068 100644 --- a/Foundation/GTMNSObject+KeyValueObserving.m +++ b/Foundation/GTMNSObject+KeyValueObserving.m @@ -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 *)¢er)) { [newCenter release]; // COV_NF_LINE no guarantee we'll hit this line } +#pragma clang diagnostic pop } return center; }