Fix some compiler warnings

pull/1/head
Michael Kirk 6 years ago
parent 8354a9c13f
commit d591fb7f2c

@ -925,7 +925,7 @@ static NSTimeInterval launchStartedAt;
- (void)application:(UIApplication *)application
handleActionWithIdentifier:(NSString *)identifier
forLocalNotification:(UILocalNotification *)notification
completionHandler:(void (^)())completionHandler
completionHandler:(void (^)(void))completionHandler
{
OWSAssertIsOnMainThread();

@ -26,7 +26,8 @@ public class MessageFetcherJob: NSObject {
SwiftSingletons.register(self)
}
@discardableResult public func run() -> Promise<Void> {
@discardableResult
public func run() -> Promise<Void> {
Logger.debug("\(self.logTag) in \(#function)")
guard signalService.isCensorshipCircumventionActive else {
@ -58,7 +59,9 @@ public class MessageFetcherJob: NSObject {
return promise
}
@objc public func run() -> AnyPromise {
@objc
@discardableResult
public func run() -> AnyPromise {
return AnyPromise(run())
}

@ -138,8 +138,8 @@ NS_ASSUME_NONNULL_BEGIN
NSString *attachmentID = [userinfo objectForKey:kAttachmentUploadAttachmentIDKey];
if ([self.attachment.uniqueId isEqual:attachmentID]) {
if (!isnan(progress)) {
[self.progressView setProgress:progress];
self.lastProgress = progress;
[self.progressView setProgress:(CGFloat)progress];
self.lastProgress = (CGFloat)progress;
self.isAttachmentReady = self.attachment.isUploaded;
} else {
OWSFail(@"%@ Invalid attachment progress.", self.logTag);

@ -67,7 +67,7 @@ NS_ASSUME_NONNULL_BEGIN
UIView *selectedBackgroundView = [UIView new];
selectedBackgroundView.backgroundColor =
[(UIColor.isThemeEnabled ? [UIColor ows_whiteColor] : [UIColor ows_blackColor]) colorWithAlphaComponent:0.08];
[(UIColor.isThemeEnabled ? [UIColor ows_whiteColor] : [UIColor ows_blackColor]) colorWithAlphaComponent:0.08f];
self.selectedBackgroundView = selectedBackgroundView;

@ -34,12 +34,14 @@ FOUNDATION_EXPORT const unsigned char SignalMessagingVersionString[];
#import <SignalMessaging/OWSQuotedReplyModel.h>
#import <SignalMessaging/OWSSounds.h>
#import <SignalMessaging/OWSTableViewController.h>
#import <SignalMessaging/OWSUnreadIndicator.h>
#import <SignalMessaging/OWSUserProfile.h>
#import <SignalMessaging/OWSWindowManager.h>
#import <SignalMessaging/Release.h>
#import <SignalMessaging/ScreenLockViewController.h>
#import <SignalMessaging/SharingThreadPickerViewController.h>
#import <SignalMessaging/SignalKeyingStorage.h>
#import <SignalMessaging/TSUnreadIndicatorInteraction.h>
#import <SignalMessaging/ThreadUtil.h>
#import <SignalMessaging/ThreadViewHelper.h>
#import <SignalMessaging/UIColor+OWS.h>

@ -53,7 +53,7 @@ NSString *NSStringForScreenLockUIState(ScreenLockUIState value)
const CGSize screenSize = UIScreen.mainScreen.bounds.size;
const CGFloat shortScreenDimension = MIN(screenSize.width, screenSize.height);
const CGFloat imageSize = round(shortScreenDimension / 3.f);
const CGFloat imageSize = (CGFloat)round(shortScreenDimension / 3.f);
[imageView autoSetDimension:ALDimensionWidth toSize:imageSize];
[imageView autoSetDimension:ALDimensionHeight toSize:imageSize];

@ -2,8 +2,8 @@
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSMath.h"
#import "UIColor+OWS.h"
#import "OWSMath.h"
#import "UIUtil.h"
#import <SignalServiceKit/Cryptography.h>
#import <SignalServiceKit/NSNotificationCenter+OWS.h>
@ -42,7 +42,7 @@ NSString *const UIColorKeyThemeEnabled = @"UIColorKeyThemeEnabled";
+ (UIColor *)ows_signalBrandBlueColor
{
return [UIColor colorWithRed:0.1135657504 green:0.4787300229 blue:0.89595204589999999 alpha:1.];
return [UIColor colorWithRed:0.1135657504f green:0.4787300229f blue:0.89595204589999999f alpha:1.];
}
+ (UIColor *)ows_materialBlueColor

@ -19,7 +19,7 @@ static const CGFloat kIPhone7PlusScreenWidth = 414.f;
CGFloat ScaleFromIPhone5To7Plus(CGFloat iPhone5Value, CGFloat iPhone7PlusValue)
{
CGFloat screenShortDimension = ScreenShortDimension();
return round(CGFloatLerp(iPhone5Value,
return (CGFloat)round(CGFloatLerp(iPhone5Value,
iPhone7PlusValue,
CGFloatInverseLerp(screenShortDimension, kIPhone5ScreenWidth, kIPhone7PlusScreenWidth)));
}
@ -27,7 +27,7 @@ CGFloat ScaleFromIPhone5To7Plus(CGFloat iPhone5Value, CGFloat iPhone7PlusValue)
CGFloat ScaleFromIPhone5(CGFloat iPhone5Value)
{
CGFloat screenShortDimension = ScreenShortDimension();
return round(iPhone5Value * screenShortDimension / kIPhone5ScreenWidth);
return (CGFloat)round(iPhone5Value * screenShortDimension / kIPhone5ScreenWidth);
}
#pragma mark -
@ -135,7 +135,7 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value)
- (NSLayoutConstraint *)autoPinToAspectRatio:(CGFloat)ratio
{
// Clamp to ensure view has reasonable aspect ratio.
CGFloat clampedRatio = CGFloatClamp(ratio, 0.05, 95.0);
CGFloat clampedRatio = CGFloatClamp(ratio, 0.05f, 95.0f);
if (clampedRatio != ratio) {
OWSFail(@"Invalid aspect ratio: %f for view: %@", ratio, self);
}
@ -254,10 +254,9 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value)
{
OWSAssert(self.superview);
self.frame = CGRectMake(round((self.superview.width - self.width) * 0.5f),
round((self.superview.height - self.height) * 0.5f),
self.width,
self.height);
CGFloat x = (CGFloat)round((self.superview.width - self.width) * 0.5f);
CGFloat y = (CGFloat)round((self.superview.height - self.height) * 0.5f);
self.frame = CGRectMake(x, y, self.width, self.height);
}
#pragma mark - RTL

@ -332,7 +332,7 @@ NSString *const OWSContactsManagerSignalAccountsDidChangeNotification
NSMutableSet<NSString *> *seenRecipientIds = [NSMutableSet new];
for (Contact *contact in contacts) {
NSArray<SignalRecipient *> *signalRecipients = contactIdToSignalRecipientsMap[contact.uniqueId];
for (SignalRecipient *signalRecipient in [signalRecipients sortedArrayUsingSelector:@selector(compare:)]) {
for (SignalRecipient *signalRecipient in [signalRecipients sortedArrayUsingSelector:@selector((compare:))]) {
if ([seenRecipientIds containsObject:signalRecipient.recipientId]) {
DDLogDebug(@"Ignoring duplicate contact: %@, %@", signalRecipient.recipientId, contact.fullName);
continue;

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWS105AttachmentFilePaths.h"
@ -32,7 +32,7 @@ static NSString *const OWS105AttachmentFilePathsMigrationId = @"105";
[attachmentStreams addObject:attachmentStream];
}];
DDLogInfo(@"Saving %zd attachment streams.", attachmentStreams.count);
DDLogInfo(@"Saving %lu attachment streams.", (unsigned long)attachmentStreams.count);
// Persist the new localRelativeFilePath property of TSAttachmentStream.
// For performance, we want to upgrade all existing attachment streams in

@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
NSMutableArray<NSString *> *recordIds = [NSMutableArray new];
[dbConnection asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
[recordIds addObjectsFromArray:[transaction allKeysInCollection:collection]];
DDLogInfo(@"%@ Migrating %zd records from: %@.", self.logTag, recordIds.count, collection);
DDLogInfo(@"%@ Migrating %lu records from: %@.", self.logTag, (unsigned long)recordIds.count, collection);
}
completionQueue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)
completionBlock:^{
@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
OWSAssert(dbConnection);
OWSAssert(completion);
DDLogVerbose(@"%@ %s: %zd", self.logTag, __PRETTY_FUNCTION__, recordIds.count);
DDLogVerbose(@"%@ %s: %lu", self.logTag, __PRETTY_FUNCTION__, (unsigned long)recordIds.count);
if (recordIds.count < 1) {
completion();

@ -531,14 +531,14 @@ const NSUInteger kOWSProfileManager_MaxAvatarDiameter = 640;
- (void)logProfileWhitelist
{
[self.dbConnection asyncReadWithBlock:^(YapDatabaseReadTransaction *transaction) {
DDLogError(@"kOWSProfileManager_UserWhitelistCollection: %zd",
[transaction numberOfKeysInCollection:kOWSProfileManager_UserWhitelistCollection]);
DDLogError(@"kOWSProfileManager_UserWhitelistCollection: %lu",
(unsigned long)[transaction numberOfKeysInCollection:kOWSProfileManager_UserWhitelistCollection]);
[transaction enumerateKeysInCollection:kOWSProfileManager_UserWhitelistCollection
usingBlock:^(NSString *_Nonnull key, BOOL *_Nonnull stop) {
DDLogError(@"\t profile whitelist user: %@", key);
}];
DDLogError(@"kOWSProfileManager_GroupWhitelistCollection: %zd",
[transaction numberOfKeysInCollection:kOWSProfileManager_GroupWhitelistCollection]);
DDLogError(@"kOWSProfileManager_GroupWhitelistCollection: %lu",
(unsigned long)[transaction numberOfKeysInCollection:kOWSProfileManager_GroupWhitelistCollection]);
[transaction enumerateKeysInCollection:kOWSProfileManager_GroupWhitelistCollection
usingBlock:^(NSString *_Nonnull key, BOOL *_Nonnull stop) {
DDLogError(@"\t profile whitelist group: %@", key);

@ -330,11 +330,11 @@ NSString *const kLocalProfileUniqueId = @"kLocalProfileUniqueId";
// This should only be used in verbose, developer-only logs.
- (NSString *)debugDescription
{
return [NSString stringWithFormat:@"%@ %p %@ %zd %@ %@ %@",
return [NSString stringWithFormat:@"%@ %p %@ %lu %@ %@ %@",
self.logTag,
self,
self.recipientId,
self.profileKey.keyData.length,
(unsigned long)self.profileKey.keyData.length,
self.profileName,
self.avatarUrlPath,
self.avatarFileName];

@ -155,7 +155,7 @@ NS_ASSUME_NONNULL_BEGIN
self.delegate.audioPlaybackState = AudioPlaybackState_Paused;
[self.audioPlayer pause];
[self.audioPlayerPoller invalidate];
[self.delegate setAudioProgress:[self.audioPlayer currentTime] duration:[self.audioPlayer duration]];
[self.delegate setAudioProgress:(CGFloat)[self.audioPlayer currentTime] duration:(CGFloat)[self.audioPlayer duration]];
[OWSAudioSession.shared endAudioActivity:self.audioActivity];
[DeviceSleepManager.sharedInstance removeBlockWithBlockObject:self];
@ -194,7 +194,7 @@ NS_ASSUME_NONNULL_BEGIN
OWSAssert(self.audioPlayer);
OWSAssert(self.audioPlayerPoller);
[self.delegate setAudioProgress:[self.audioPlayer currentTime] duration:[self.audioPlayer duration]];
[self.delegate setAudioProgress:(CGFloat)[self.audioPlayer currentTime] duration:(CGFloat)[self.audioPlayer duration]];
}
- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag

@ -124,7 +124,7 @@ NS_ASSUME_NONNULL_BEGIN
[initials appendString:@"#"];
}
CGFloat fontSize = (CGFloat)self.diameter / 2.8;
CGFloat fontSize = (CGFloat)self.diameter / 2.8f;
UIImage *image = [[JSQMessagesAvatarImageFactory avatarImageWithUserInitials:initials
backgroundColor:self.color

@ -30,7 +30,7 @@ static inline CGFloat CGFloatInverseLerp(CGFloat value, CGFloat minValue, CGFloa
// Ceil to an even number
static inline CGFloat CeilEven(CGFloat value)
{
return 2.f * ceil(value * 0.5f);
return 2.f * (CGFloat)ceil(value * 0.5f);
}
void SetRandFunctionSeed(void);

@ -731,7 +731,7 @@ NS_ASSUME_NONNULL_BEGIN
OWSProdLogAndFail(@"%@ couldn't load uniqueIds for collection: %@.", self.logTag, collection);
return;
}
DDLogInfo(@"%@ Deleting %zd objects from: %@", self.logTag, uniqueIds.count, collection);
DDLogInfo(@"%@ Deleting %lu objects from: %@", self.logTag, (unsigned long)uniqueIds.count, collection);
NSUInteger count = 0;
for (NSString *uniqueId in uniqueIds) {
// We need to fetch each object, since [TSYapDatabaseObject removeWithTransaction:] sometimes does important
@ -744,7 +744,7 @@ NS_ASSUME_NONNULL_BEGIN
[object removeWithTransaction:transaction];
count++;
};
DDLogInfo(@"%@ Deleted %zd/%zd objects from: %@", self.logTag, count, uniqueIds.count, collection);
DDLogInfo(@"%@ Deleted %lu/%lu objects from: %@", self.logTag, (unsigned long)count, (unsigned long)uniqueIds.count, collection);
}
#pragma mark - Find Content

@ -414,7 +414,7 @@ NSString *const TSAccountManager_ServerSignalingKey = @"TSStorageServerSignaling
case 423: {
NSString *localizedMessage = NSLocalizedString(@"REGISTRATION_VERIFICATION_FAILED_WRONG_PIN",
"Error message indicating that registration failed due to a missing or incorrect 2FA PIN.");
DDLogError(@"%@ 2FA PIN required: %ld", self.logTag, error.code);
DDLogError(@"%@ 2FA PIN required: %ld", self.logTag, (long)error.code);
NSError *error
= OWSErrorWithCodeDescription(OWSErrorCodeRegistrationMissing2FAPIN, localizedMessage);
failureBlock(error);

@ -85,7 +85,7 @@ NS_ASSUME_NONNULL_BEGIN
- (NSString *)debugDescription
{
return [NSString stringWithFormat:@"%@ with message timestamps: %zd", self.logTag, self.messageTimestamps.count];
return [NSString stringWithFormat:@"%@ with message timestamps: %lu", self.logTag, (unsigned long)self.messageTimestamps.count];
}
@end

@ -36,23 +36,23 @@ typedef NS_ENUM(int32_t, TSErrorMessageType) {
quotedMessage:(nullable TSQuotedMessage *)quotedMessage
contactShare:(nullable OWSContact *)contact NS_UNAVAILABLE;
- (instancetype)initWithTimestamp:(uint64_t)timestamp
inThread:(nullable TSThread *)thread
messageBody:(nullable NSString *)body
attachmentIds:(NSArray<NSString *> *)attachmentIds
expiresInSeconds:(uint32_t)expiresInSeconds
expireStartedAt:(uint64_t)expireStartedAt NS_UNAVAILABLE;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithTimestamp:(uint64_t)timestamp
inThread:(TSThread *)thread
inThread:(nullable TSThread *)thread
failedMessageType:(TSErrorMessageType)errorMessageType
recipientId:(nullable NSString *)recipientId NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithTimestamp:(uint64_t)timestamp
inThread:(TSThread *)thread
failedMessageType:(TSErrorMessageType)errorMessageType;
- (instancetype)initWithTimestamp:(uint64_t)timestamp
inThread:(nullable TSThread *)thread
messageBody:(nullable NSString *)body
attachmentIds:(NSArray<NSString *> *)attachmentIds
expiresInSeconds:(uint32_t)expiresInSeconds
expireStartedAt:(uint64_t)expireStartedAt NS_UNAVAILABLE;
failedMessageType:(TSErrorMessageType)errorMessageType;
+ (instancetype)corruptedMessageWithEnvelope:(OWSSignalServiceProtosEnvelope *)envelope
withTransaction:(YapDatabaseReadWriteTransaction *)transaction;

@ -48,14 +48,7 @@ NSUInteger TSErrorMessageSchemaVersion = 1;
}
- (instancetype)initWithTimestamp:(uint64_t)timestamp
inThread:(TSThread *)thread
failedMessageType:(TSErrorMessageType)errorMessageType
{
return [self initWithTimestamp:timestamp inThread:thread failedMessageType:errorMessageType recipientId:nil];
}
- (instancetype)initWithTimestamp:(uint64_t)timestamp
inThread:(TSThread *)thread
inThread:(nullable TSThread *)thread
failedMessageType:(TSErrorMessageType)errorMessageType
recipientId:(nullable NSString *)recipientId
{
@ -83,6 +76,13 @@ NSUInteger TSErrorMessageSchemaVersion = 1;
return self;
}
- (instancetype)initWithTimestamp:(uint64_t)timestamp
inThread:(nullable TSThread *)thread
failedMessageType:(TSErrorMessageType)errorMessageType
{
return [self initWithTimestamp:timestamp inThread:thread failedMessageType:errorMessageType recipientId:nil];
}
- (instancetype)initWithEnvelope:(OWSSignalServiceProtosEnvelope *)envelope
withTransaction:(YapDatabaseReadWriteTransaction *)transaction
failedMessageType:(TSErrorMessageType)errorMessageType

@ -356,11 +356,11 @@ NSString *const OWSMessageContentJobFinderExtensionGroup = @"OWSMessageContentJo
backgroundTask = nil;
DDLogVerbose(@"%@ completed %lu/%lu jobs. %zd jobs left.",
DDLogVerbose(@"%@ completed %lu/%lu jobs. %lu jobs left.",
self.logTag,
(unsigned long)processedJobs.count,
(unsigned long)batchJobs.count,
[OWSMessageContentJob numberOfKeysInCollection]);
(unsigned long)[OWSMessageContentJob numberOfKeysInCollection]);
// Wait a bit in hopes of increasing the batch size.
// This delay won't affect the first message to arrive when this queue is idle,

@ -257,9 +257,9 @@ NS_ASSUME_NONNULL_BEGIN
DDLogInfo(@"%@ Missing message for delivery receipt: %llu", self.logTag, timestamp);
} else {
if (messages.count > 1) {
DDLogInfo(@"%@ More than one message (%zd) for delivery receipt: %llu",
DDLogInfo(@"%@ More than one message (%lu) for delivery receipt: %llu",
self.logTag,
messages.count,
(unsigned long)messages.count,
timestamp);
}
for (TSOutgoingMessage *outgoingMessage in messages) {

@ -226,9 +226,9 @@ NSString *const OWSReadReceiptManagerAreReadReceiptsEnabled = @"areReadReceiptsE
[self.messageSender enqueueMessage:message
success:^{
DDLogInfo(@"%@ Successfully sent %zd read receipt to linked devices.",
DDLogInfo(@"%@ Successfully sent %lu read receipt to linked devices.",
self.logTag,
readReceiptsForLinkedDevices.count);
(unsigned long)readReceiptsForLinkedDevices.count);
}
failure:^(NSError *error) {
DDLogError(@"%@ Failed to send read receipt to linked devices with error: %@", self.logTag, error);
@ -250,7 +250,7 @@ NSString *const OWSReadReceiptManagerAreReadReceiptsEnabled = @"areReadReceiptsE
[self.messageSender enqueueMessage:message
success:^{
DDLogInfo(@"%@ Successfully sent %zd read receipts to sender.", self.logTag, timestamps.count);
DDLogInfo(@"%@ Successfully sent %lu read receipts to sender.", self.logTag, (unsigned long)timestamps.count);
}
failure:^(NSError *error) {
DDLogError(@"%@ Failed to send read receipts to sender with error: %@", self.logTag, error);

@ -202,7 +202,7 @@ typedef void (^failureBlock)(NSURLSessionDataTask *task, NSError *error);
break;
}
case 411: {
DDLogInfo(@"Multi-device pairing: %zd, %@, %@", statusCode, networkError.debugDescription, request);
DDLogInfo(@"Multi-device pairing: %ld, %@, %@", (long)statusCode, networkError.debugDescription, request);
failureBlock(task,
[self errorWithHTTPCode:statusCode
description:NSLocalizedString(@"MULTIDEVICE_PAIRING_MAX_DESC", nil)
@ -239,7 +239,7 @@ typedef void (^failureBlock)(NSURLSessionDataTask *task, NSError *error);
break;
}
default: {
DDLogWarn(@"Unknown error: %zd, %@, %@", statusCode, networkError.debugDescription, request);
DDLogWarn(@"Unknown error: %ld, %@, %@", (long)statusCode, networkError.debugDescription, request);
failureBlock(task, error);
break;
}

@ -584,8 +584,7 @@ NSString *const kNSNotification_SocketManagerStateDidChange = @"kNSNotification_
if (message.hasBody) {
responseData = message.body;
}
NSArray<NSString *> *_Nullable responseHeaders = message.headers;
BOOL hasValidResponse = YES;
id responseObject = responseData;
if (responseData) {

@ -1,9 +1,10 @@
// Copyright © 2016 Open Whisper Systems. All rights reserved.
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSWebsocketSecurityPolicy.h"
#import <SocketRocket/SRSecurityPolicy.h>
#import "OWSHTTPSecurityPolicy.h"
#import <SocketRocket/SRSecurityPolicy.h>
@implementation OWSWebsocketSecurityPolicy
@ -11,7 +12,11 @@
static OWSWebsocketSecurityPolicy *websocketSecurityPolicy = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
// We use our own CA
websocketSecurityPolicy = [[self alloc] initWithCertificateChainValidationEnabled:NO];
#pragma clang diagnostic pop
});
return websocketSecurityPolicy;
}

@ -2,8 +2,8 @@
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSFileSystem.h"
#import "OWSPrimaryStorage+SessionStore.h"
#import "OWSFileSystem.h"
#import "YapDatabaseConnection+OWS.h"
#import "YapDatabaseTransaction+OWS.h"
#import <AxolotlKit/SessionRecord.h>
@ -66,6 +66,8 @@ NSString *const kSessionStoreDBConnectionKey = @"kSessionStoreDBConnectionKey";
return record;
}
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (NSArray *)subDevicesSessions:(NSString *)contactIdentifier protocolContext:(nullable id)protocolContext
{
OWSAssert(contactIdentifier.length > 0);
@ -82,6 +84,7 @@ NSString *const kSessionStoreDBConnectionKey = @"kSessionStoreDBConnectionKey";
return dictionary ? dictionary.allKeys : @[];
}
#pragma clang diagnostic pop
- (void)storeSession:(NSString *)contactIdentifier
deviceId:(int)deviceId

@ -213,7 +213,7 @@ NS_ASSUME_NONNULL_BEGIN
} else if (range.location != index || range.length < 1) {
// This should never happen.
OWSFail(
@"%@ unexpected composed character sequence: %zd, %@", self.logTag, index, NSStringFromRange(range));
@"%@ unexpected composed character sequence: %lu, %@", self.logTag, (unsigned long)index, NSStringFromRange(range));
return YES;
}
index = range.location + range.length;

@ -266,10 +266,10 @@ NSString *NSStringForOWSAnalyticsSeverity(OWSAnalyticsSeverity severity)
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSOperatingSystemVersion operatingSystemVersion = [[NSProcessInfo processInfo] operatingSystemVersion];
result = [NSString stringWithFormat:@"%zd.%zd.%zd",
(NSUInteger)operatingSystemVersion.majorVersion,
(NSUInteger)operatingSystemVersion.minorVersion,
(NSUInteger)operatingSystemVersion.patchVersion];
result = [NSString stringWithFormat:@"%lu.%lu.%lu",
(unsigned long)operatingSystemVersion.majorVersion,
(unsigned long)operatingSystemVersion.minorVersion,
(unsigned long)operatingSystemVersion.patchVersion];
});
return result;
}

@ -98,12 +98,12 @@ NSString *const OWSOperationKeyIsFinished = @"isFinished";
- (void)reportError:(NSError *)error
{
DDLogDebug(@"%@ reportError: %@, fatal?: %d, retryable?: %d, remainingRetries: %zd",
DDLogDebug(@"%@ reportError: %@, fatal?: %d, retryable?: %d, remainingRetries: %lu",
self.logTag,
error,
error.isFatal,
error.isRetryable,
self.remainingRetries);
(unsigned long)self.remainingRetries);
if (error.isFatal) {
[self failOperationWithError:error];

Loading…
Cancel
Save