Fix compiler warnings

pull/1/head
Michael Kirk 6 years ago
parent f9ff1b22cc
commit 67cc1027cc

@ -50,7 +50,7 @@ typedef NS_ENUM(NSUInteger, OWSBubbleShapeViewMode) {
- (instancetype)initDraw - (instancetype)initDraw
{ {
self = [super init]; self = [super initWithFrame:CGRectZero];
if (!self) { if (!self) {
return self; return self;
} }
@ -64,7 +64,7 @@ typedef NS_ENUM(NSUInteger, OWSBubbleShapeViewMode) {
- (instancetype)initShadow - (instancetype)initShadow
{ {
self = [super init]; self = [super initWithFrame:CGRectZero];
if (!self) { if (!self) {
return self; return self;
} }
@ -78,7 +78,7 @@ typedef NS_ENUM(NSUInteger, OWSBubbleShapeViewMode) {
- (instancetype)initClip - (instancetype)initClip
{ {
self = [super init]; self = [super initWithFrame:CGRectZero];
if (!self) { if (!self) {
return self; return self;
} }
@ -92,7 +92,7 @@ typedef NS_ENUM(NSUInteger, OWSBubbleShapeViewMode) {
- (instancetype)initInnerShadowWithColor:(UIColor *)color radius:(CGFloat)radius opacity:(float)opacity - (instancetype)initInnerShadowWithColor:(UIColor *)color radius:(CGFloat)radius opacity:(float)opacity
{ {
self = [super init]; self = [super initWithFrame:CGRectZero];
if (!self) { if (!self) {
return self; return self;
} }

@ -93,7 +93,7 @@ public class BlockListCache: NSObject {
blockedGroupIds.contains(groupThread.groupModel.groupId) blockedGroupIds.contains(groupThread.groupModel.groupId)
} }
default: default:
owsFail("\(self.logTag) in \(#function) unexepected thread type: \(type(of: thread))") owsFailDebug("\(self.logTag) in \(#function) unexpected thread type: \(type(of: thread))")
return false return false
} }
} }

@ -172,8 +172,8 @@ NSString *NSStringFromOWSInteractionType(OWSInteractionType value)
- (void)saveWithTransaction:(YapDatabaseReadWriteTransaction *)transaction { - (void)saveWithTransaction:(YapDatabaseReadWriteTransaction *)transaction {
if (!self.uniqueId) { if (!self.uniqueId) {
OWSFailDebug(self.uniqueId); OWSFailDebug(@"Missing uniqueId.");
self.uniqueId = [NSUUID new]; self.uniqueId = [NSUUID new].UUIDString;
} }
[super saveWithTransaction:transaction]; [super saveWithTransaction:transaction];

@ -2,8 +2,8 @@
// Copyright (c) 2018 Open Whisper Systems. All rights reserved. // Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// //
#import "OWSFileSystem.h"
#import "OWSPrimaryStorage+SessionStore.h" #import "OWSPrimaryStorage+SessionStore.h"
#import "OWSFileSystem.h"
#import "SSKEnvironment.h" #import "SSKEnvironment.h"
#import "YapDatabaseConnection+OWS.h" #import "YapDatabaseConnection+OWS.h"
#import "YapDatabaseTransaction+OWS.h" #import "YapDatabaseTransaction+OWS.h"
@ -61,7 +61,7 @@ NSString *const kSessionStoreDBConnectionKey = @"kSessionStoreDBConnectionKey";
} }
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (NSArray *)subDevicesSessions:(NSString *)contactIdentifier protocolContext:(nullable id)protocolContext - (NSArray *)subDevicesSessions:(NSString *)contactIdentifier protocolContext:(nullable id)protocolContext
{ {
OWSAssertDebug(contactIdentifier.length > 0); OWSAssertDebug(contactIdentifier.length > 0);

Loading…
Cancel
Save