Merge branch 'mkirk/fix-build-warnings'

This commit is contained in:
Michael Kirk 2018-06-11 09:56:48 -04:00
commit 1db1d76d98
24 changed files with 69 additions and 15 deletions

View file

@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)init NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithPhoneNumbers:(NSArray<NSString *> *)phoneNumbers NS_DESIGNATED_INITIALIZER; - (instancetype)initWithPhoneNumbers:(NSArray<NSString *> *)phoneNumbers NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end @end

View file

@ -1,5 +1,5 @@
// //
// Copyright (c) 2017 Open Whisper Systems. All rights reserved. // Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// //
#import "OWSBlockedPhoneNumbersMessage.h" #import "OWSBlockedPhoneNumbersMessage.h"
@ -15,6 +15,11 @@ NS_ASSUME_NONNULL_BEGIN
@implementation OWSBlockedPhoneNumbersMessage @implementation OWSBlockedPhoneNumbersMessage
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (instancetype)initWithPhoneNumbers:(NSArray<NSString *> *)phoneNumbers - (instancetype)initWithPhoneNumbers:(NSArray<NSString *> *)phoneNumbers
{ {
self = [super init]; self = [super init];

View file

@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)init NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithReadReceipts:(NSArray<OWSLinkedDeviceReadReceipt *> *)readReceipts NS_DESIGNATED_INITIALIZER; - (instancetype)initWithReadReceipts:(NSArray<OWSLinkedDeviceReadReceipt *> *)readReceipts NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end @end

View file

@ -28,6 +28,11 @@ NS_ASSUME_NONNULL_BEGIN
return self; return self;
} }
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder - (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder
{ {
OWSSignalServiceProtosSyncMessageBuilder *syncMessageBuilder = [OWSSignalServiceProtosSyncMessageBuilder new]; OWSSignalServiceProtosSyncMessageBuilder *syncMessageBuilder = [OWSSignalServiceProtosSyncMessageBuilder new];

View file

@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithVerificationState:(OWSVerificationState)verificationState - (instancetype)initWithVerificationState:(OWSVerificationState)verificationState
identityKey:(NSData *)identityKey identityKey:(NSData *)identityKey
verificationForRecipientId:(NSString *)recipientId NS_DESIGNATED_INITIALIZER; verificationForRecipientId:(NSString *)recipientId NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
// This is a clunky name, but we want to differentiate it from `recipientIdentifier` inherited from `TSOutgoingMessage` // This is a clunky name, but we want to differentiate it from `recipientIdentifier` inherited from `TSOutgoingMessage`
@property (nonatomic, readonly) NSString *verificationForRecipientId; @property (nonatomic, readonly) NSString *verificationForRecipientId;

View file

@ -1,5 +1,5 @@
// //
// Copyright (c) 2017 Open Whisper Systems. All rights reserved. // Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// //
#import "OWSVerificationStateSyncMessage.h" #import "OWSVerificationStateSyncMessage.h"
@ -49,6 +49,11 @@ NS_ASSUME_NONNULL_BEGIN
return self; return self;
} }
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder - (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder
{ {
OWSAssert(self.identityKey.length == kIdentityKeyLength); OWSAssert(self.identityKey.length == kIdentityKeyLength);

View file

@ -17,6 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)init NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithOutgoingMessage:(TSOutgoingMessage *)message NS_DESIGNATED_INITIALIZER; - (instancetype)initWithOutgoingMessage:(TSOutgoingMessage *)message NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end @end

View file

@ -48,6 +48,11 @@ NS_ASSUME_NONNULL_BEGIN
return self; return self;
} }
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder - (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder
{ {
OWSSignalServiceProtosSyncMessageBuilder *syncMessageBuilder = [OWSSignalServiceProtosSyncMessageBuilder new]; OWSSignalServiceProtosSyncMessageBuilder *syncMessageBuilder = [OWSSignalServiceProtosSyncMessageBuilder new];

View file

@ -25,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
contactShare:(nullable OWSContact *)contactShare NS_UNAVAILABLE; contactShare:(nullable OWSContact *)contactShare NS_UNAVAILABLE;
- (instancetype)init NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end @end

View file

@ -12,14 +12,9 @@ NS_ASSUME_NONNULL_BEGIN
@implementation OWSOutgoingSyncMessage @implementation OWSOutgoingSyncMessage
- (instancetype)initWithCoder:(NSCoder *)coder - (nullable instancetype)initWithCoder:(NSCoder *)coder
{ {
self = [super initWithCoder:coder]; return [super initWithCoder:coder];
if (self) {
}
return self;
} }
- (instancetype)init - (instancetype)init

View file

@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)init NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithReadReceiptsEnabled:(BOOL)readReceiptsEnabled NS_DESIGNATED_INITIALIZER; - (instancetype)initWithReadReceiptsEnabled:(BOOL)readReceiptsEnabled NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end @end

View file

@ -1,5 +1,5 @@
// //
// Copyright (c) 2017 Open Whisper Systems. All rights reserved. // Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// //
#import "OWSSyncConfigurationMessage.h" #import "OWSSyncConfigurationMessage.h"
@ -27,6 +27,11 @@ NS_ASSUME_NONNULL_BEGIN
return self; return self;
} }
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder - (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder
{ {

View file

@ -19,6 +19,8 @@ NS_ASSUME_NONNULL_BEGIN
identityManager:(OWSIdentityManager *)identityManager identityManager:(OWSIdentityManager *)identityManager
profileManager:(id<ProfileManagerProtocol>)profileManager NS_DESIGNATED_INITIALIZER; profileManager:(id<ProfileManagerProtocol>)profileManager NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
- (NSData *)buildPlainTextAttachmentData; - (NSData *)buildPlainTextAttachmentData;
@end @end

View file

@ -42,6 +42,11 @@ NS_ASSUME_NONNULL_BEGIN
return self; return self;
} }
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder - (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder
{ {
if (self.attachmentIds.count != 1) { if (self.attachmentIds.count != 1) {

View file

@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface OWSSyncGroupsMessage : OWSOutgoingSyncMessage @interface OWSSyncGroupsMessage : OWSOutgoingSyncMessage
- (instancetype)init NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
- (NSData *)buildPlainTextAttachmentDataWithTransaction:(YapDatabaseReadTransaction *)transaction; - (NSData *)buildPlainTextAttachmentDataWithTransaction:(YapDatabaseReadTransaction *)transaction;

View file

@ -20,6 +20,11 @@ NS_ASSUME_NONNULL_BEGIN
return [super init]; return [super init];
} }
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder - (OWSSignalServiceProtosSyncMessageBuilder *)syncMessageBuilder
{ {

View file

@ -21,6 +21,7 @@ NS_SWIFT_NAME(EndSessionMessage)
contactShare:(nullable OWSContact *)contactShare NS_UNAVAILABLE; contactShare:(nullable OWSContact *)contactShare NS_UNAVAILABLE;
- (instancetype)initWithTimestamp:(uint64_t)timestamp inThread:(nullable TSThread *)thread NS_DESIGNATED_INITIALIZER; - (instancetype)initWithTimestamp:(uint64_t)timestamp inThread:(nullable TSThread *)thread NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end @end

View file

@ -36,7 +36,7 @@ typedef NS_ENUM(int32_t, TSErrorMessageType) {
quotedMessage:(nullable TSQuotedMessage *)quotedMessage quotedMessage:(nullable TSQuotedMessage *)quotedMessage
contactShare:(nullable OWSContact *)contact NS_UNAVAILABLE; contactShare:(nullable OWSContact *)contact NS_UNAVAILABLE;
- (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithTimestamp:(uint64_t)timestamp - (instancetype)initWithTimestamp:(uint64_t)timestamp
inThread:(TSThread *)thread inThread:(TSThread *)thread

View file

@ -27,7 +27,7 @@ NSUInteger TSErrorMessageSchemaVersion = 1;
@implementation TSErrorMessage @implementation TSErrorMessage
- (instancetype)initWithCoder:(NSCoder *)coder - (nullable instancetype)initWithCoder:(NSCoder *)coder
{ {
self = [super initWithCoder:coder]; self = [super initWithCoder:coder];
if (!self) { if (!self) {

View file

@ -88,7 +88,7 @@ typedef NS_ENUM(NSInteger, TSGroupMetaMessage) {
quotedMessage:(nullable TSQuotedMessage *)quotedMessage quotedMessage:(nullable TSQuotedMessage *)quotedMessage
contactShare:(nullable OWSContact *)contactShare NS_DESIGNATED_INITIALIZER; contactShare:(nullable OWSContact *)contactShare NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
+ (instancetype)outgoingMessageInThread:(nullable TSThread *)thread + (instancetype)outgoingMessageInThread:(nullable TSThread *)thread
messageBody:(nullable NSString *)body messageBody:(nullable NSString *)body

View file

@ -91,7 +91,7 @@ NSString *NSStringForOutgoingMessageRecipientState(OWSOutgoingMessageRecipientSt
@implementation TSOutgoingMessage @implementation TSOutgoingMessage
- (instancetype)initWithCoder:(NSCoder *)coder - (nullable instancetype)initWithCoder:(NSCoder *)coder
{ {
self = [super initWithCoder:coder]; self = [super initWithCoder:coder];

View file

@ -20,6 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
contactShare:(nullable OWSContact *)contactShare NS_UNAVAILABLE; contactShare:(nullable OWSContact *)contactShare NS_UNAVAILABLE;
- (instancetype)initWithTimestamp:(uint64_t)timestamp inThread:(nullable TSThread *)thread NS_DESIGNATED_INITIALIZER; - (instancetype)initWithTimestamp:(uint64_t)timestamp inThread:(nullable TSThread *)thread NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@end @end

View file

@ -26,6 +26,11 @@ NS_ASSUME_NONNULL_BEGIN
contactShare:nil]; contactShare:nil];
} }
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
return [super initWithCoder:coder];
}
- (BOOL)shouldBeSaved - (BOOL)shouldBeSaved
{ {
return NO; return NO;

View file

@ -1,5 +1,5 @@
// //
// Copyright (c) 2017 Open Whisper Systems. All rights reserved. // Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// //
#import "TSRecipient.h" #import "TSRecipient.h"
@ -8,6 +8,14 @@ NS_ASSUME_NONNULL_BEGIN
@implementation TSRecipient @implementation TSRecipient
- (void)encodeWithCoder:(nonnull NSCoder *)aCoder {
return;
}
- (nullable instancetype)initWithCoder:(nonnull NSCoder *)aDecoder {
return nil;
}
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END