Enable (quick) static analyzer for normal builds
// FREEBIE
This commit is contained in:
parent
77997639f5
commit
baacebc956
|
@ -3906,6 +3906,9 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
|
||||||
|
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
|
||||||
|
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Signal/Signal.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Signal/Signal.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
|
@ -3951,6 +3954,7 @@
|
||||||
PRODUCT_NAME = Signal;
|
PRODUCT_NAME = Signal;
|
||||||
PROVISIONING_PROFILE = "";
|
PROVISIONING_PROFILE = "";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
RUN_CLANG_STATIC_ANALYZER = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Signal/src/Signal-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Signal/src/Signal-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
@ -3968,6 +3972,9 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
|
||||||
|
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
|
||||||
|
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Signal/Signal.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Signal/Signal.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
|
@ -4012,6 +4019,7 @@
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.whispersystems.signal;
|
PRODUCT_BUNDLE_IDENTIFIER = org.whispersystems.signal;
|
||||||
PRODUCT_NAME = Signal;
|
PRODUCT_NAME = Signal;
|
||||||
PROVISIONING_PROFILE = "";
|
PROVISIONING_PROFILE = "";
|
||||||
|
RUN_CLANG_STATIC_ANALYZER = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Signal/src/Signal-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Signal/src/Signal-Bridging-Header.h";
|
||||||
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
- (void)viewDidLoad
|
- (void)viewDidLoad
|
||||||
{
|
{
|
||||||
|
[super viewDidLoad];
|
||||||
|
|
||||||
[self updateTableContents];
|
[self updateTableContents];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
|
|
||||||
- (void)viewDidAppear:(BOOL)animated
|
- (void)viewDidAppear:(BOOL)animated
|
||||||
{
|
{
|
||||||
|
[super viewDidAppear:animated];
|
||||||
|
|
||||||
[self updateTableContents];
|
[self updateTableContents];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
- (void)viewDidAppear:(BOOL)animated
|
- (void)viewDidAppear:(BOOL)animated
|
||||||
{
|
{
|
||||||
|
[super viewDidAppear:animated];
|
||||||
[self updateTableContents];
|
[self updateTableContents];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -312,7 +312,7 @@ int const OWSLinkedDevicesTableViewControllerSectionAddDevice = 1;
|
||||||
return cell;
|
return cell;
|
||||||
} else {
|
} else {
|
||||||
DDLogError(@"Unknown section: %@", indexPath);
|
DDLogError(@"Unknown section: %@", indexPath);
|
||||||
return nil;
|
return [UITableViewCell new];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
- (void)viewDidAppear:(BOOL)animated
|
- (void)viewDidAppear:(BOOL)animated
|
||||||
{
|
{
|
||||||
|
[super viewDidAppear:animated];
|
||||||
|
|
||||||
[self updateTableContents];
|
[self updateTableContents];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
- (void)viewDidAppear:(BOOL)animated
|
- (void)viewDidAppear:(BOOL)animated
|
||||||
{
|
{
|
||||||
|
[super viewDidAppear:animated];
|
||||||
|
|
||||||
[self updateTableContents];
|
[self updateTableContents];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1862,20 +1862,24 @@ typedef enum : NSUInteger {
|
||||||
[self presentViewController:actionSheetController animated:YES completion:nil];
|
[self presentViewController:actionSheetController animated:YES completion:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)tappedNonBlockingIdentityChangeForRecipientId:(nullable NSString *)signalId
|
- (void)tappedNonBlockingIdentityChangeForRecipientId:(nullable NSString *)signalIdParam
|
||||||
{
|
{
|
||||||
if (signalId == nil) {
|
if (signalIdParam == nil) {
|
||||||
if (self.thread.isGroupThread) {
|
if (self.thread.isGroupThread) {
|
||||||
// Before 2.13 we didn't track the recipient id in the identity change error.
|
// Before 2.13 we didn't track the recipient id in the identity change error.
|
||||||
DDLogWarn(@"%@ Ignoring tap on legacy nonblocking identity change since it has no signal id", self.logTag);
|
DDLogWarn(@"%@ Ignoring tap on legacy nonblocking identity change since it has no signal id", self.logTag);
|
||||||
|
return;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
DDLogInfo(
|
DDLogInfo(
|
||||||
@"%@ Assuming tap on legacy nonblocking identity change corresponds to current contact thread: %@",
|
@"%@ Assuming tap on legacy nonblocking identity change corresponds to current contact thread: %@",
|
||||||
self.logTag,
|
self.logTag,
|
||||||
self.thread.contactIdentifier);
|
self.thread.contactIdentifier);
|
||||||
signalId = self.thread.contactIdentifier;
|
signalIdParam = self.thread.contactIdentifier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NSString *signalId = signalIdParam;
|
||||||
|
|
||||||
[self showFingerprintWithRecipientId:signalId];
|
[self showFingerprintWithRecipientId:signalId];
|
||||||
}
|
}
|
||||||
|
|
|
@ -907,7 +907,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *)callingCodeForPossiblePhoneNumber:(NSString *)phoneNumber
|
- (nullable NSString *)callingCodeForPossiblePhoneNumber:(NSString *)phoneNumber
|
||||||
{
|
{
|
||||||
OWSAssert([phoneNumber hasPrefix:@"+"]);
|
OWSAssert([phoneNumber hasPrefix:@"+"]);
|
||||||
|
|
||||||
|
@ -924,7 +924,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
NSString *searchText = self.searchBar.text;
|
NSString *searchText = self.searchBar.text;
|
||||||
|
|
||||||
if (searchText.length < 8) {
|
if (searchText.length < 8) {
|
||||||
return nil;
|
return @[];
|
||||||
}
|
}
|
||||||
|
|
||||||
NSMutableSet<NSString *> *parsedPhoneNumbers = [NSMutableSet new];
|
NSMutableSet<NSString *> *parsedPhoneNumbers = [NSMutableSet new];
|
||||||
|
@ -935,7 +935,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
NSString *phoneNumberString = phoneNumber.toE164;
|
NSString *phoneNumberString = phoneNumber.toE164;
|
||||||
|
|
||||||
// Ignore phone numbers with an unrecognized calling code.
|
// Ignore phone numbers with an unrecognized calling code.
|
||||||
NSString *callingCode = [self callingCodeForPossiblePhoneNumber:phoneNumberString];
|
NSString *_Nullable callingCode = [self callingCodeForPossiblePhoneNumber:phoneNumberString];
|
||||||
if (!callingCode) {
|
if (!callingCode) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue