From 422336db32852a410da39c6143ecdf57ce9a397d Mon Sep 17 00:00:00 2001 From: "markus.fassbender" Date: Fri, 7 Jul 2017 10:36:16 +0200 Subject: [PATCH] fixes compiler warnings FREEBIE --- .../ConversationView/OWSMessagesInputToolbar.m | 4 ++-- .../ViewControllers/DebugUI/DebugUIContacts.m | 4 +++- .../ViewControllers/DebugUI/DebugUIMessages.m | 16 ++++++++-------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/OWSMessagesInputToolbar.m b/Signal/src/ViewControllers/ConversationView/OWSMessagesInputToolbar.m index 550e5c5a7..0ef379d0c 100644 --- a/Signal/src/ViewControllers/ConversationView/OWSMessagesInputToolbar.m +++ b/Signal/src/ViewControllers/ConversationView/OWSMessagesInputToolbar.m @@ -14,13 +14,13 @@ NS_ASSUME_NONNULL_BEGIN @interface OWSMessagesInputToolbar () -@property (nonatomic) UIView *voiceMemoUI; +@property (nonatomic, nullable) UIView *voiceMemoUI; @property (nonatomic) UIView *voiceMemoContentView; @property (nonatomic) NSDate *voiceMemoStartTime; -@property (nonatomic) NSTimer *voiceMemoUpdateTimer; +@property (nonatomic, nullable) NSTimer *voiceMemoUpdateTimer; @property (nonatomic) UILabel *recordingLabel; diff --git a/Signal/src/ViewControllers/DebugUI/DebugUIContacts.m b/Signal/src/ViewControllers/DebugUI/DebugUIContacts.m index 20333e451..b83243d3b 100644 --- a/Signal/src/ViewControllers/DebugUI/DebugUIContacts.m +++ b/Signal/src/ViewControllers/DebugUI/DebugUIContacts.m @@ -1107,7 +1107,9 @@ NS_ASSUME_NONNULL_BEGIN @"Noel", @"Vang", ]; - return values[arc4random_uniform(values.count)]; + + uint32_t index = arc4random_uniform((uint32_t)values.count); + return values[index]; } diff --git a/Signal/src/ViewControllers/DebugUI/DebugUIMessages.m b/Signal/src/ViewControllers/DebugUI/DebugUIMessages.m index 1cb9c5603..1d72a34b4 100644 --- a/Signal/src/ViewControllers/DebugUI/DebugUIMessages.m +++ b/Signal/src/ViewControllers/DebugUI/DebugUIMessages.m @@ -781,15 +781,15 @@ NS_ASSUME_NONNULL_BEGIN @"one that comes after it."), @"War against a foreign country only happens when the moneyed classes think they are going to profit from it.", @"People have only as much liberty as they have the intelligence to want and the courage to take.", - @"You cannot buy the revolution. You cannot make the revolution. You can only be the revolution. It is in your " - @"spirit, or it is nowhere.", - @"That is what I have always understood to be the essence of anarchism: the conviction that the burden of " - @"proof has to be placed on authority, and that it should be dismantled if that burden cannot be met.", - @"Ask for work. If they don't give you work, ask for bread. If they do not give you work or bread, then take " - @"bread.", + (@"You cannot buy the revolution. You cannot make the revolution. You can only be the revolution. It is in your " + @"spirit, or it is nowhere."), + (@"That is what I have always understood to be the essence of anarchism: the conviction that the burden of " + @"proof has to be placed on authority, and that it should be dismantled if that burden cannot be met."), + (@"Ask for work. If they don't give you work, ask for bread. If they do not give you work or bread, then take " + @"bread."), @"Every society has the criminals it deserves.", - @"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer " - @"are wise enough to rule others.", + (@"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer " + @"are wise enough to rule others."), @"If you would know who controls you see who you may not criticise.", @"At one time in the world there were woods that no one owned." ];