From ad31c75e88d64adda1dca5d70a6ded754daf318d Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Thu, 4 May 2017 17:55:06 -0400 Subject: [PATCH] fix more compiler warnings * initWithCoder is a designated initializer for *any* TSYapDatabase model * doc fixes * cast log param appropriately Compiler Warnings: 337 -> 331 // FREEBIE --- src/Devices/OWSDevice.h | 4 ++-- src/Messages/Attachments/TSAttachmentPointer.h | 2 ++ src/Security/OWSFingerprint.m | 2 +- src/Storage/AxolotlStore/TSStorageManager+SignedPreKeyStore.m | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Devices/OWSDevice.h b/src/Devices/OWSDevice.h index 5caf78e4b..ce3230a57 100644 --- a/src/Devices/OWSDevice.h +++ b/src/Devices/OWSDevice.h @@ -22,7 +22,7 @@ extern uint32_t const OWSDevicePrimaryDeviceId; * Set local database of devices to `devices`. * * This will create missing devices, update existing devices, and delete stale devices. - * @param devices + * @param devices Removes any existing devices, replacing them with `devices` */ + (void)replaceAll:(NSArray *)devices; @@ -33,7 +33,7 @@ extern uint32_t const OWSDevicePrimaryDeviceId; /** * - * @param transaction + * @param transaction yapTransaction * @return * If the user has any linked devices (apart from the device this app is running on). */ diff --git a/src/Messages/Attachments/TSAttachmentPointer.h b/src/Messages/Attachments/TSAttachmentPointer.h index 9daf32879..80201766d 100644 --- a/src/Messages/Attachments/TSAttachmentPointer.h +++ b/src/Messages/Attachments/TSAttachmentPointer.h @@ -17,6 +17,8 @@ typedef NS_ENUM(NSUInteger, TSAttachmentPointerState) { */ @interface TSAttachmentPointer : TSAttachment +- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER; + - (instancetype)initWithServerId:(UInt64)serverId key:(NSData *)key digest:(nullable NSData *)digest diff --git a/src/Security/OWSFingerprint.m b/src/Security/OWSFingerprint.m index 6be522e00..79ecdc705 100644 --- a/src/Security/OWSFingerprint.m +++ b/src/Security/OWSFingerprint.m @@ -196,7 +196,7 @@ static uint32_t const OWSFingerprintDefaultHashIterations = 5200; * * This method is intended to be somewhat expensive to produce in order to be brute force adverse. * - * @param stableId + * @param stableIdData * Immutable global identifier e.g. Signal Identifier, an e164 formatted phone number encoded as UTF-8 data * @param publicKey * The current public key for diff --git a/src/Storage/AxolotlStore/TSStorageManager+SignedPreKeyStore.m b/src/Storage/AxolotlStore/TSStorageManager+SignedPreKeyStore.m index ed9ffc848..8bbf3eb8c 100644 --- a/src/Storage/AxolotlStore/TSStorageManager+SignedPreKeyStore.m +++ b/src/Storage/AxolotlStore/TSStorageManager+SignedPreKeyStore.m @@ -153,7 +153,7 @@ NSString *const TSStorageManagerKeyPrekeyCurrentSignedPrekeyId = @"currentSigned DDLogInfo(@"%@ SignedPreKeys Report:", tag); DDLogInfo(@"%@ currentId: %@", tag, currentId); DDLogInfo(@"%@ firstPrekeyUpdateFailureDate: %@", tag, firstPrekeyUpdateFailureDate); - DDLogInfo(@"%@ prekeyUpdateFailureCount: %d", tag, prekeyUpdateFailureCount); + DDLogInfo(@"%@ prekeyUpdateFailureCount: %lu", tag, (unsigned long)prekeyUpdateFailureCount); NSUInteger count = [transaction numberOfKeysInCollection:TSStorageManagerSignedPreKeyStoreCollection]; DDLogInfo(@"%@ All Keys (count: %lu):", tag, (unsigned long)count);