diff --git a/Signal/src/network/GiphyDownloader.swift b/Signal/src/network/GiphyDownloader.swift index dc05f3b7b..d4b5e9ba8 100644 --- a/Signal/src/network/GiphyDownloader.swift +++ b/Signal/src/network/GiphyDownloader.swift @@ -802,7 +802,7 @@ extension URLSessionTask { return } guard let httpResponse = task.response as? HTTPURLResponse else { - Logger.error("\(TAG) missing or unexpected response: \(task.response)") + Logger.error("\(TAG) missing or unexpected response: \(String(describing: task.response))") segmentRequestDidFail(assetRequest:assetRequest, assetSegment:assetSegment) return } diff --git a/SignalServiceKit/src/Account/TSPreKeyManager.m b/SignalServiceKit/src/Account/TSPreKeyManager.m index b9ae9477d..50618e153 100644 --- a/SignalServiceKit/src/Account/TSPreKeyManager.m +++ b/SignalServiceKit/src/Account/TSPreKeyManager.m @@ -344,7 +344,7 @@ static const NSTimeInterval kSignedPreKeyUpdateFailureMaxFailureDuration = 10 * [self clearSignedPreKeyRecordsWithKeyId:currentSignedPrekeyId success:nil]; } -+ (void)clearSignedPreKeyRecordsWithKeyId:(NSNumber *)keyId success:(void (^_Nullable)())successHandler ++ (void)clearSignedPreKeyRecordsWithKeyId:(NSNumber *)keyId success:(void (^_Nullable)(void))successHandler { if (!keyId) { OWSFail(@"%@ Ignoring request to clear signed preKeys since no keyId was specified", self.logTag); diff --git a/SignalServiceKit/src/Messages/Attachments/OWSAttachmentsProcessor.m b/SignalServiceKit/src/Messages/Attachments/OWSAttachmentsProcessor.m index b96cb4931..42af6c758 100644 --- a/SignalServiceKit/src/Messages/Attachments/OWSAttachmentsProcessor.m +++ b/SignalServiceKit/src/Messages/Attachments/OWSAttachmentsProcessor.m @@ -305,7 +305,7 @@ static const CGFloat kAttachmentDownloadProgressTheta = 0.001f; return; } - void (^abortDownload)() = ^{ + void (^abortDownload)(void) = ^{ OWSFail(@"%@ Download aborted.", self.logTag); [task cancel]; }; diff --git a/SignalServiceKit/src/Messages/OWSMessageDecrypter.h b/SignalServiceKit/src/Messages/OWSMessageDecrypter.h index b3dcfce76..8ac758a65 100644 --- a/SignalServiceKit/src/Messages/OWSMessageDecrypter.h +++ b/SignalServiceKit/src/Messages/OWSMessageDecrypter.h @@ -9,7 +9,7 @@ NS_ASSUME_NONNULL_BEGIN @class OWSSignalServiceProtosEnvelope; typedef void (^DecryptSuccessBlock)(NSData *_Nullable plaintextData); -typedef void (^DecryptFailureBlock)(); +typedef void (^DecryptFailureBlock)(void); @interface OWSMessageDecrypter : OWSMessageHandler diff --git a/SignalServiceKit/src/Network/API/OWSUploadingService.m b/SignalServiceKit/src/Network/API/OWSUploadingService.m index 122537257..03a203d3d 100644 --- a/SignalServiceKit/src/Network/API/OWSUploadingService.m +++ b/SignalServiceKit/src/Network/API/OWSUploadingService.m @@ -47,7 +47,7 @@ static const CGFloat kAttachmentUploadProgressTheta = 0.001f; success:(void (^)(void))successHandler failure:(RetryableFailureHandler)failureHandler { - void (^successHandlerWrapper)() = ^{ + void (^successHandlerWrapper)(void) = ^{ [self fireProgressNotification:1 attachmentId:attachmentStream.uniqueId]; successHandler(); @@ -61,7 +61,7 @@ static const CGFloat kAttachmentUploadProgressTheta = 0.001f; if (attachmentStream.serverId) { DDLogDebug(@"%@ Attachment previously uploaded.", self.logTag); - successHandlerWrapper(outgoingMessage); + successHandlerWrapper(); return; } diff --git a/SignalServiceKit/src/Network/API/Requests/OWSDeleteDeviceRequest.h b/SignalServiceKit/src/Network/API/Requests/OWSDeleteDeviceRequest.h index 044cd057e..f4ba003c9 100644 --- a/SignalServiceKit/src/Network/API/Requests/OWSDeleteDeviceRequest.h +++ b/SignalServiceKit/src/Network/API/Requests/OWSDeleteDeviceRequest.h @@ -1,4 +1,6 @@ -// Copyright © 2016 Open Whisper Systems. All rights reserved. +// +// Copyright (c) 2017 Open Whisper Systems. All rights reserved. +// #import "TSRequest.h" @@ -12,4 +14,4 @@ NS_ASSUME_NONNULL_BEGIN @end -NS_ASSUME_NONNULL_END \ No newline at end of file +NS_ASSUME_NONNULL_END diff --git a/SignalServiceKit/src/Network/API/Requests/TSProfileAvatarUploadFormRequest.h b/SignalServiceKit/src/Network/API/Requests/TSProfileAvatarUploadFormRequest.h index 5e80c51ec..8a32f12cd 100644 --- a/SignalServiceKit/src/Network/API/Requests/TSProfileAvatarUploadFormRequest.h +++ b/SignalServiceKit/src/Network/API/Requests/TSProfileAvatarUploadFormRequest.h @@ -8,7 +8,7 @@ NS_ASSUME_NONNULL_BEGIN @interface TSProfileAvatarUploadFormRequest : TSRequest -- (nullable instancetype)init; +- (instancetype)init; @end diff --git a/SignalServiceKit/src/Network/API/Requests/TSProfileAvatarUploadFormRequest.m b/SignalServiceKit/src/Network/API/Requests/TSProfileAvatarUploadFormRequest.m index bb820c210..0b0972a46 100644 --- a/SignalServiceKit/src/Network/API/Requests/TSProfileAvatarUploadFormRequest.m +++ b/SignalServiceKit/src/Network/API/Requests/TSProfileAvatarUploadFormRequest.m @@ -9,7 +9,7 @@ NS_ASSUME_NONNULL_BEGIN @implementation TSProfileAvatarUploadFormRequest -- (nullable instancetype)init +- (instancetype)init { self = [super initWithURL:[NSURL URLWithString:textSecureProfileAvatarFormAPI]]; diff --git a/SignalServiceKit/src/Storage/OWSOrphanedDataCleaner.h b/SignalServiceKit/src/Storage/OWSOrphanedDataCleaner.h index 960256a10..1b4f8fb2f 100644 --- a/SignalServiceKit/src/Storage/OWSOrphanedDataCleaner.h +++ b/SignalServiceKit/src/Storage/OWSOrphanedDataCleaner.h @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN + (void)auditAsync; // completion, if present, will be invoked on the main thread. -+ (void)auditAndCleanupAsync:(void (^_Nullable)())completion; ++ (void)auditAndCleanupAsync:(void (^_Nullable)(void))completion; + (NSSet *)filePathsInAttachmentsFolder; diff --git a/SignalServiceKit/src/Storage/OWSOrphanedDataCleaner.m b/SignalServiceKit/src/Storage/OWSOrphanedDataCleaner.m index 35fdfc30e..4d05cf886 100644 --- a/SignalServiceKit/src/Storage/OWSOrphanedDataCleaner.m +++ b/SignalServiceKit/src/Storage/OWSOrphanedDataCleaner.m @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN }); } -+ (void)auditAndCleanupAsync:(void (^_Nullable)())completion ++ (void)auditAndCleanupAsync:(void (^_Nullable)(void))completion { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ [OWSOrphanedDataCleaner auditAndCleanup:YES completion:completion]; @@ -47,7 +47,7 @@ NS_ASSUME_NONNULL_BEGIN // They can't be cleaned up - we don't want to delete the TSAttachmentStream or // its corresponding message. Better that the broken message shows up in the // conversation view. -+ (void)auditAndCleanup:(BOOL)shouldCleanup completion:(void (^_Nullable)())completion ++ (void)auditAndCleanup:(BOOL)shouldCleanup completion:(void (^_Nullable)(void))completion { NSSet *diskFilePaths = [self filePathsInAttachmentsFolder]; long long totalFileSize = [self fileSizeOfFilePaths:diskFilePaths.allObjects]; diff --git a/SignalServiceKit/src/Storage/TSStorageManager.h b/SignalServiceKit/src/Storage/TSStorageManager.h index 38ce97988..753408f8e 100644 --- a/SignalServiceKit/src/Storage/TSStorageManager.h +++ b/SignalServiceKit/src/Storage/TSStorageManager.h @@ -34,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN * Specifically, these migration should not depend on or affect the data * of any database view. */ -- (void)setupDatabaseWithSafeBlockingMigrations:(void (^_Nonnull)())safeBlockingMigrationsBlock; +- (void)setupDatabaseWithSafeBlockingMigrations:(void (^_Nonnull)(void))safeBlockingMigrationsBlock; - (void)deleteThreadsAndMessages; - (void)resetSignalStorage; diff --git a/SignalServiceKit/src/Storage/TSStorageManager.m b/SignalServiceKit/src/Storage/TSStorageManager.m index 207973206..503226efd 100644 --- a/SignalServiceKit/src/Storage/TSStorageManager.m +++ b/SignalServiceKit/src/Storage/TSStorageManager.m @@ -307,7 +307,7 @@ void setDatabaseInitialized() }; } -- (void)setupDatabaseWithSafeBlockingMigrations:(void (^_Nonnull)())safeBlockingMigrationsBlock +- (void)setupDatabaseWithSafeBlockingMigrations:(void (^_Nonnull)(void))safeBlockingMigrationsBlock { // Synchronously register extensions which are essential for views. [TSDatabaseView registerCrossProcessNotifier]; diff --git a/SignalServiceKit/src/Util/OWSAnalytics.h b/SignalServiceKit/src/Util/OWSAnalytics.h index 840f6a8cd..9cb59ed4d 100755 --- a/SignalServiceKit/src/Util/OWSAnalytics.h +++ b/SignalServiceKit/src/Util/OWSAnalytics.h @@ -44,7 +44,7 @@ typedef NS_ENUM(NSUInteger, OWSAnalyticsSeverity) { @end -typedef NSDictionary *_Nonnull (^OWSProdAssertParametersBlock)(); +typedef NSDictionary *_Nonnull (^OWSProdAssertParametersBlock)(void); // These methods should be used to assert errors for which we want to fire analytics events. // diff --git a/SignalServiceKit/src/Util/OWSAnalytics.m b/SignalServiceKit/src/Util/OWSAnalytics.m index 8e8662474..28ed30e25 100755 --- a/SignalServiceKit/src/Util/OWSAnalytics.m +++ b/SignalServiceKit/src/Util/OWSAnalytics.m @@ -222,8 +222,8 @@ NSString *NSStringForOWSAnalyticsSeverity(OWSAnalyticsSeverity severity) - (void)submitEvent:(NSDictionary *)eventDictionary eventKey:(NSString *)eventKey - success:(void (^_Nonnull)())successBlock - failure:(void (^_Nonnull)())failureBlock + success:(void (^_Nonnull)(void))successBlock + failure:(void (^_Nonnull)(void))failureBlock { OWSAssert(eventDictionary); OWSAssert(eventKey); @@ -311,7 +311,7 @@ NSString *NSStringForOWSAnalyticsSeverity(OWSAnalyticsSeverity severity) return; } - void (^addEvent)() = ^{ + void (^addEvent)(void) = ^{ // Add super properties. NSMutableDictionary *eventProperties = (properties ? [properties mutableCopy] : [NSMutableDictionary new]); [eventProperties addEntriesFromDictionary:self.eventSuperProperties]; diff --git a/SignalServiceKit/src/Util/OWSDispatch.h b/SignalServiceKit/src/Util/OWSDispatch.h index e31eebc35..9a3c9d4e5 100644 --- a/SignalServiceKit/src/Util/OWSDispatch.h +++ b/SignalServiceKit/src/Util/OWSDispatch.h @@ -24,6 +24,6 @@ NS_ASSUME_NONNULL_BEGIN @end -void AssertIsOnMainThread(); +void AssertIsOnMainThread(void); NS_ASSUME_NONNULL_END diff --git a/SignalServiceKit/src/Util/OWSError.h b/SignalServiceKit/src/Util/OWSError.h index 834497c88..6fbe95752 100644 --- a/SignalServiceKit/src/Util/OWSError.h +++ b/SignalServiceKit/src/Util/OWSError.h @@ -30,12 +30,12 @@ typedef NS_ENUM(NSInteger, OWSErrorCode) { }; extern NSError *OWSErrorWithCodeDescription(OWSErrorCode code, NSString *description); -extern NSError *OWSErrorMakeUnableToProcessServerResponseError(); -extern NSError *OWSErrorMakeFailedToSendOutgoingMessageError(); -extern NSError *OWSErrorMakeNoSuchSignalRecipientError(); -extern NSError *OWSErrorMakeAssertionError(); -extern NSError *OWSErrorMakeMessageSendDisabledDueToPreKeyUpdateFailuresError(); -extern NSError *OWSErrorMakeMessageSendFailedToBlockListError(); -extern NSError *OWSErrorMakeWriteAttachmentDataError(); +extern NSError *OWSErrorMakeUnableToProcessServerResponseError(void); +extern NSError *OWSErrorMakeFailedToSendOutgoingMessageError(void); +extern NSError *OWSErrorMakeNoSuchSignalRecipientError(void); +extern NSError *OWSErrorMakeAssertionError(void); +extern NSError *OWSErrorMakeMessageSendDisabledDueToPreKeyUpdateFailuresError(void); +extern NSError *OWSErrorMakeMessageSendFailedToBlockListError(void); +extern NSError *OWSErrorMakeWriteAttachmentDataError(void); NS_ASSUME_NONNULL_END