mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
iOS: fixed remaining Xcode 8 warnings
Now zero warnings on build. Ah, so much cleaner.
This commit is contained in:
parent
b7eb330eea
commit
d77ddc0161
8 changed files with 34 additions and 11 deletions
|
@ -145,7 +145,7 @@ static const NSUInteger kDomainSection = 1;
|
|||
CGRect f = [[UIScreen mainScreen] applicationFrame];
|
||||
|
||||
// Swap the frame height and width if necessary
|
||||
if (UIDeviceOrientationIsLandscape(o)) {
|
||||
if (UIInterfaceOrientationIsLandscape(o)) {
|
||||
CGFloat t;
|
||||
t = f.size.width;
|
||||
f.size.width = f.size.height;
|
||||
|
@ -268,7 +268,7 @@ static const NSUInteger kDomainSection = 1;
|
|||
{
|
||||
UINavigationBar *navigationBar = [[[self view] subviews] objectAtIndex:0];
|
||||
UINavigationItem *navItem = [[navigationBar items] objectAtIndex:0];
|
||||
if (UIInterfaceOrientationIsPortrait([[UIDevice currentDevice] orientation])) {
|
||||
if (UIDeviceOrientationIsPortrait([[UIDevice currentDevice] orientation])) {
|
||||
// Setup the title
|
||||
if ([self type] == ASIProxyAuthenticationType) {
|
||||
[navItem setPrompt:@"Login to this secure proxy server."];
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
if (err) {
|
||||
*err = [[self class] deflateErrorWithCode:status];
|
||||
}
|
||||
return NO;
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -423,6 +423,10 @@
|
|||
cell = (AddSiteAutocompleteCell *)oneObject;
|
||||
}
|
||||
}
|
||||
|
||||
if (cell == nil) {
|
||||
cell = [AddSiteAutocompleteCell new];
|
||||
}
|
||||
}
|
||||
|
||||
NSDictionary *result = [self.autocompleteResults objectAtIndex:indexPath.row];
|
||||
|
|
|
@ -131,7 +131,9 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {
|
|||
|
||||
AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability];
|
||||
manager.networkReachabilityAssociation = AFNetworkReachabilityForName;
|
||||
|
||||
|
||||
CFRelease(reachability);
|
||||
|
||||
return manager;
|
||||
}
|
||||
|
||||
|
@ -140,7 +142,9 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {
|
|||
|
||||
AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability];
|
||||
manager.networkReachabilityAssociation = AFNetworkReachabilityForAddress;
|
||||
|
||||
|
||||
CFRelease(reachability);
|
||||
|
||||
return manager;
|
||||
}
|
||||
|
||||
|
@ -150,7 +154,7 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {
|
|||
return nil;
|
||||
}
|
||||
|
||||
self.networkReachability = CFBridgingRelease(reachability);
|
||||
_networkReachability = CFRetain(reachability);
|
||||
self.networkReachabilityStatus = AFNetworkReachabilityStatusUnknown;
|
||||
|
||||
return self;
|
||||
|
|
|
@ -700,7 +700,11 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
|
|||
uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!uploadTask) {
|
||||
uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];
|
||||
}
|
||||
|
||||
[self addDelegateForUploadTask:uploadTask progress:progress completionHandler:completionHandler];
|
||||
|
||||
return uploadTask;
|
||||
|
|
|
@ -67,8 +67,13 @@ static const char encodingTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopq
|
|||
bytes[length++] = (buffer[2] << 6) | buffer[3];
|
||||
}
|
||||
|
||||
realloc(bytes, length);
|
||||
return [NSData dataWithBytesNoCopy:bytes length:length];
|
||||
char *temp = realloc(bytes, length);
|
||||
|
||||
if (temp) {
|
||||
return [NSData dataWithBytesNoCopy:bytes length:length];
|
||||
} else {
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (NSString *)base64Encoding;
|
||||
|
|
|
@ -99,7 +99,9 @@ static void TMReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkRea
|
|||
if (ref)
|
||||
{
|
||||
id reachability = [[self alloc] initWithReachabilityRef:ref];
|
||||
|
||||
|
||||
CFRelease(ref);
|
||||
|
||||
return reachability;
|
||||
}
|
||||
|
||||
|
@ -113,6 +115,8 @@ static void TMReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkRea
|
|||
{
|
||||
id reachability = [[self alloc] initWithReachabilityRef:ref];
|
||||
|
||||
CFRelease(ref);
|
||||
|
||||
return reachability;
|
||||
}
|
||||
|
||||
|
@ -150,7 +154,7 @@ static void TMReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkRea
|
|||
if (self != nil)
|
||||
{
|
||||
self.reachableOnWWAN = YES;
|
||||
self.reachabilityRef = ref;
|
||||
_reachabilityRef = CFRetain(ref);
|
||||
|
||||
// We need to create a serial queue.
|
||||
// We allocate this once for the lifetime of the notifier.
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
|
||||
[self commonInit];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue