From becd72329b6bc0eebcd1329dbc07fb79845e73f0 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Tue, 22 Jan 2019 17:27:52 -0500 Subject: [PATCH] Fix build warnings about nullability. --- SignalServiceKit/src/Network/API/Requests/TSRequest.h | 6 +++++- SignalServiceKit/src/Network/API/Requests/TSRequest.m | 10 +++++++--- SignalServiceKit/src/Util/NSData+Image.h | 6 +++++- SignalServiceKit/src/Util/NSData+Image.m | 6 +++++- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/SignalServiceKit/src/Network/API/Requests/TSRequest.h b/SignalServiceKit/src/Network/API/Requests/TSRequest.h index 069a706d0..25e9c3933 100644 --- a/SignalServiceKit/src/Network/API/Requests/TSRequest.h +++ b/SignalServiceKit/src/Network/API/Requests/TSRequest.h @@ -1,7 +1,9 @@ // -// Copyright (c) 2018 Open Whisper Systems. All rights reserved. +// Copyright (c) 2019 Open Whisper Systems. All rights reserved. // +NS_ASSUME_NONNULL_BEGIN + @class SMKUDAccessKey; @interface TSRequest : NSMutableURLRequest @@ -30,3 +32,5 @@ parameters:(nullable NSDictionary *)parameters; @end + +NS_ASSUME_NONNULL_END diff --git a/SignalServiceKit/src/Network/API/Requests/TSRequest.m b/SignalServiceKit/src/Network/API/Requests/TSRequest.m index e253706f7..c36c861da 100644 --- a/SignalServiceKit/src/Network/API/Requests/TSRequest.m +++ b/SignalServiceKit/src/Network/API/Requests/TSRequest.m @@ -1,5 +1,5 @@ // -// Copyright (c) 2018 Open Whisper Systems. All rights reserved. +// Copyright (c) 2019 Open Whisper Systems. All rights reserved. // #import "TSRequest.h" @@ -8,6 +8,8 @@ #import #import +NS_ASSUME_NONNULL_BEGIN + @implementation TSRequest @synthesize authUsername = _authUsername; @@ -94,7 +96,7 @@ } } -- (NSString *)authUsername +- (nullable NSString *)authUsername { OWSAssertDebug(self.shouldHaveAuthorizationHeaders); @@ -103,7 +105,7 @@ } } -- (NSString *)authPassword +- (nullable NSString *)authPassword { OWSAssertDebug(self.shouldHaveAuthorizationHeaders); @@ -113,3 +115,5 @@ } @end + +NS_ASSUME_NONNULL_END diff --git a/SignalServiceKit/src/Util/NSData+Image.h b/SignalServiceKit/src/Util/NSData+Image.h index 4e353a0cd..8ba02fff3 100644 --- a/SignalServiceKit/src/Util/NSData+Image.h +++ b/SignalServiceKit/src/Util/NSData+Image.h @@ -1,7 +1,9 @@ // -// Copyright (c) 2018 Open Whisper Systems. All rights reserved. +// Copyright (c) 2019 Open Whisper Systems. All rights reserved. // +NS_ASSUME_NONNULL_BEGIN + @interface NSData (Image) // If mimeType is non-nil, we ensure that the magic numbers agree with the @@ -19,3 +21,5 @@ + (BOOL)hasAlphaForValidImageFilePath:(NSString *)filePath; @end + +NS_ASSUME_NONNULL_END diff --git a/SignalServiceKit/src/Util/NSData+Image.m b/SignalServiceKit/src/Util/NSData+Image.m index 4ba9b9673..13610f8ab 100644 --- a/SignalServiceKit/src/Util/NSData+Image.m +++ b/SignalServiceKit/src/Util/NSData+Image.m @@ -1,5 +1,5 @@ // -// Copyright (c) 2018 Open Whisper Systems. All rights reserved. +// Copyright (c) 2019 Open Whisper Systems. All rights reserved. // #import "NSData+Image.h" @@ -8,6 +8,8 @@ #import #import +NS_ASSUME_NONNULL_BEGIN + typedef NS_ENUM(NSInteger, ImageFormat) { ImageFormat_Unknown, ImageFormat_Png, @@ -403,3 +405,5 @@ typedef NS_ENUM(NSInteger, ImageFormat) { } @end + +NS_ASSUME_NONNULL_END