Fix some compiler warnings

These seem to appear if the project is ARC based, even though this lib is non ARC as of now
This commit is contained in:
Andreas Linde
2012-08-02 12:32:11 +02:00
parent 913c51fafb
commit f3c5b8b5e6
2 changed files with 8 additions and 2 deletions

View File

@@ -397,7 +397,10 @@
// special addition to get rootViewController from three20 which has it's own controller handling
if (NSClassFromString(@"TTNavigator")) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
parentViewController = [[NSClassFromString(@"TTNavigator") performSelector:(NSSelectorFromString(@"navigator"))] visibleViewController];
#pragma clang diagnostic pop
}
if (_navController != nil) [_navController release];
@@ -1049,7 +1052,7 @@
// invoke the selected action from the actionsheet for a location element
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex {
if ([alertView tag] == 2) {
[self initiateAppDownload];
(void)[self initiateAppDownload];
_updateAlertShowing = NO;
return;
} else if ([alertView tag] == 1) {
@@ -1063,7 +1066,7 @@
[self showUpdateView];
} else if (buttonIndex == [alertView firstOtherButtonIndex] + 1) {
// YES button has been clicked
[self initiateAppDownload];
(void)[self initiateAppDownload];
}
}

View File

@@ -236,7 +236,10 @@
SEL presentingViewControllerSelector = NSSelectorFromString(@"presentingViewController");
UIViewController *presentingViewController = nil;
if ([self respondsToSelector:presentingViewControllerSelector]) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
presentingViewController = [self performSelector:presentingViewControllerSelector];
#pragma clang diagnostic pop
}
else {
presentingViewController = [self parentViewController];