Fix latest analyzer warnings

This commit is contained in:
Zorg committed 2017-01-07 11:22:13 -05:00
1 parent 874ec099b9
commit 3b2ea83c6f
2 files changed
+4 -1

No files matched your search

+3 -1
View File
@@ -194,7 +194,9 @@
if (!updateVersion || [comparator compareVersion:hostVersion toVersion:updateVersion] == NSOrderedDescending) {
NSString *errorMessage = [NSString stringWithFormat:@"For security reasons, updates that downgrade version of the application are not allowed. Refusing to downgrade app from version %@ to %@. Aborting update.", hostVersion, [bundle objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleVersionKey]];
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUDowngradeError userInfo:@{ NSLocalizedDescriptionKey: errorMessage }];
if (error != NULL) {
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUDowngradeError userInfo:@{ NSLocalizedDescriptionKey: errorMessage }];
}
return NO;
}
@@ -79,6 +79,7 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.3;
if (hostBundleIdentifier == nil) {
SULog(SULogLevelError, @"Error: Host bundle identifier for target is nil");
[self cleanupAndExitWithStatus:EXIT_FAILURE];
return nil; // just to silence analyzer warnings later about hostBundleIdentifier being nil
}
// Note that we are connecting to the installer rather than the installer connecting to us