Merge branch 'mkirk/fix-compiler-warnings'

pull/1/head
Michael Kirk 7 years ago
commit 2241c1b132

@ -128,7 +128,7 @@ public class ConversationMediaView: UIView {
animatedImageView.backgroundColor = Theme.offBackgroundColor
addSubview(animatedImageView)
animatedImageView.autoPinEdgesToSuperviewEdges()
addUploadProgressIfNecessary(animatedImageView)
_ = addUploadProgressIfNecessary(animatedImageView)
loadBlock = { [weak self] in
guard let strongSelf = self else {
@ -177,7 +177,7 @@ public class ConversationMediaView: UIView {
stillImageView.backgroundColor = Theme.offBackgroundColor
addSubview(stillImageView)
stillImageView.autoPinEdgesToSuperviewEdges()
addUploadProgressIfNecessary(stillImageView)
_ = addUploadProgressIfNecessary(stillImageView)
loadBlock = { [weak self] in
guard let strongSelf = self else {
return

@ -14,8 +14,6 @@ NS_ASSUME_NONNULL_BEGIN
- (void)inputTextViewSendMessagePressed;
- (void)inputTextViewDidChangeText;
- (void)textViewDidChange:(UITextView *)textView;
@end

@ -43,7 +43,7 @@ public class TypingIndicatorInteraction: TSInteraction {
}
@objc
public override func save(with transaction: YapDatabaseReadWriteTransaction!) {
public override func save(with transaction: YapDatabaseReadWriteTransaction) {
owsFailDebug("The transient interaction should not be saved in the database.")
}
}

@ -19,13 +19,11 @@ import SignalMessaging
// MARK: - Dependencies
private var contactsManager : OWSContactsManager
{
private var contactsManager: OWSContactsManager {
return Environment.shared.contactsManager
}
private var contactsUpdater : ContactsUpdater
{
private var contactsUpdater: ContactsUpdater {
return SSKEnvironment.shared.contactsUpdater
}
@ -48,7 +46,9 @@ import SignalMessaging
/**
* |recipientId| is a e164 formatted phone number.
*/
@discardableResult @objc public func initiateCall(recipientId: String,
@discardableResult
@objc
public func initiateCall(recipientId: String,
isVideo: Bool) -> Bool {
guard let callUIAdapter = AppEnvironment.shared.callService.callUIAdapter else {
owsFailDebug("missing callUIAdapter")
@ -71,17 +71,7 @@ import SignalMessaging
return false
}
// Check for microphone permissions
// Alternative way without prompting for permissions:
// if AVAudioSession.sharedInstance().recordPermission() == .denied {
frontmostViewController.ows_ask(forMicrophonePermissions: { [weak self] granted in
// Success callback; camera permissions are granted.
guard let strongSelf = self else {
return
}
// Here the permissions are either granted or denied
frontmostViewController.ows_ask(forMicrophonePermissions: { granted in
guard granted == true else {
Logger.warn("aborting due to missing microphone permissions.")
OWSAlerts.showNoMicrophonePermissionAlert()

@ -1163,7 +1163,7 @@ class HardenedRTCSessionDescription {
options: .caseInsensitive)
return regex.stringByReplacingMatches(in: sdp, options: [], range: NSRange(location: 0, length: sdp.count), withTemplate: "[ REDACTED_IPV6_ADDRESS ]")
} catch {
owsFail("Could not redact IPv6 addresses.")
owsFailDebug("Could not redact IPv6 addresses.")
return "[Could not redact IPv6 addresses.]"
}
#endif

@ -113,7 +113,7 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
let call = SignalCall.outgoingCall(localId: UUID(), remotePhoneNumber: handle)
// make sure we don't terminate audio session during call
self.audioSession.startAudioActivity(call.audioActivity)
_ = self.audioSession.startAudioActivity(call.audioActivity)
// Add the new outgoing call to the app's list of calls.
// So we can find it in the provider delegate callbacks.
@ -385,7 +385,7 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
Logger.debug("Received")
self.audioSession.startAudioActivity(self.audioActivity)
_ = self.audioSession.startAudioActivity(self.audioActivity)
self.audioSession.isRTCAudioEnabled = true
}

@ -141,7 +141,7 @@ extension CallUIAdaptee {
AssertIsOnMainThread()
// make sure we don't terminate audio session during call
audioSession.startAudioActivity(call.audioActivity)
_ = audioSession.startAudioActivity(call.audioActivity)
let callerName = self.contactsManager.displayName(forPhoneIdentifier: call.remotePhoneNumber)
adaptee.reportIncomingCall(call, callerName: callerName)

@ -585,7 +585,7 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error);
uint8_t byte = (uint8_t)(0xff & byteValue);
[groupId appendBytes:&byte length:1];
}
if (groupId.length != kGroupIdLength) {
if (groupId.length != (NSUInteger)kGroupIdLength) {
OWSFailDebug(@"Parsed group id has unexpected length: %@ (%lu)",
groupId.hexadecimalString,
(unsigned long)groupId.length);

@ -13,6 +13,8 @@ NS_ASSUME_NONNULL_BEGIN
@interface TSYapDatabaseObject : MTLModel
- (instancetype)init NS_DESIGNATED_INITIALIZER;
/**
* Initializes a new database object with a unique identifier
*
@ -20,8 +22,8 @@ NS_ASSUME_NONNULL_BEGIN
*
* @return Initialized object
*/
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithUniqueId:(NSString *_Nullable)uniqueId NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
/**

@ -4,7 +4,6 @@
import Foundation
import PromiseKit
import SignalServiceKit
public extension MessageSender {

@ -172,7 +172,7 @@ public class ShareViewController: UIViewController, ShareViewDelegate, SAEFailed
// At this point, potentially lengthy DB locking migrations could be running.
// Avoid blocking app launch by putting all further possible DB access in async block
DispatchQueue.global().async { [weak self] in
guard let strongSelf = self else { return }
guard let _ = self else { return }
Logger.info("running post launch block for registered user: \(TSAccountManager.localNumber)")
// We don't need to use OWSDisappearingMessagesJob in the SAE.
@ -191,7 +191,7 @@ public class ShareViewController: UIViewController, ShareViewDelegate, SAEFailed
if TSAccountManager.isRegistered() {
DispatchQueue.main.async { [weak self] in
guard let strongSelf = self else { return }
guard let _ = self else { return }
Logger.info("running post launch block for registered user: \(TSAccountManager.localNumber)")
// We don't need to use the TSSocketManager in the SAE.
@ -694,7 +694,7 @@ public class ShareViewController: UIViewController, ShareViewDelegate, SAEFailed
let loadCompletion: NSItemProvider.CompletionHandler = { [weak self]
(value, error) in
guard let strongSelf = self else { return }
guard let _ = self else { return }
guard error == nil else {
resolver.reject(error!)

Loading…
Cancel
Save