Skip to content

Commit

Permalink
Merge pull request #9290 from hansemannn/TIMOB-25046-6_2_X
Browse files Browse the repository at this point in the history
[TIMOB-25046] (6_2_X) iOS: Fix peek-and-pop and other analyser warnings
  • Loading branch information
mukherjee2 committed Aug 15, 2017
2 parents 71b415e + ce5477c commit b3fcbfb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion iphone/Classes/TiMediaMusicPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ -(NSArray*)itemsFromArg:(id)args
subreason:nil
location:CODELOCATION];

return;
return items;
}

[items addObject:[query.items firstObject]];
Expand Down
6 changes: 0 additions & 6 deletions iphone/Classes/TiUIOptionDialogProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,6 @@ -(void)hide:(id)args
return;
}

id options = nil;
if ([args count]>0) {
options = [args objectAtIndex:0];
}
BOOL animatedhide = [TiUtils boolValue:@"animated" properties:options def:YES];

TiThreadPerformOnMainThread(^{
if (alertController != nil) {
[alertController dismissViewControllerAnimated:animated completion:^{
Expand Down
4 changes: 2 additions & 2 deletions iphone/Classes/TiUIiOSPreviewActionProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ -(NSString*)apiName
-(UIPreviewAction*)action
{
if (action == nil) {
action = [UIPreviewAction actionWithTitle:_title style:_style handler:^void(UIPreviewAction *_action, UIViewController *_controller) {
action = [[UIPreviewAction actionWithTitle:_title style:_style handler:^void(UIPreviewAction *_action, UIViewController *_controller) {
if ([self _hasListeners:@"click"]) {
[self fireEventWithAction:_action];
}
}];
}] retain];
}

return action;
Expand Down
4 changes: 3 additions & 1 deletion iphone/Classes/TiUIiOSPreviewContextProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ -(void)dealloc

-(void)connectToDelegate
{
#ifndef __clang_analyzer__
UIView *nativeSourceView = nil;

#ifdef USE_TI_UILISTVIEW
Expand All @@ -84,8 +85,9 @@ -(void)connectToDelegate
}

UIViewController *controller = [[[TiApp app] controller] topPresentedController];
[controller registerForPreviewingWithDelegate:[[[TiPreviewingDelegate alloc] initWithPreviewContext:self] autorelease]
[controller registerForPreviewingWithDelegate:[[TiPreviewingDelegate alloc] initWithPreviewContext:self]
sourceView:nativeSourceView];
#endif
}

@end
Expand Down

0 comments on commit b3fcbfb

Please sign in to comment.