From 198a2af5ebe7acf8313d8ef0dda31b4dfce7ba16 Mon Sep 17 00:00:00 2001 From: Ali Rizvi Date: Fri, 2 Sep 2011 17:51:07 -0700 Subject: [PATCH] Refactor: Got rid of all Analyzer warning except for "View is clipping its contents" --- AppController.m | 5 +++-- LoginItem/LoginItemsAE.c | 2 -- UKPrefsPanel/UKPrefsPanel.m | 11 +++++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/AppController.m b/AppController.m index 2a614b4..33ad598 100755 --- a/AppController.m +++ b/AppController.m @@ -340,8 +340,9 @@ case NSHomeFunctionKey: if ( [clippingStore jcListCount] > 0 ) { stackPosition = 0; - [bezel setCharString:[NSString stringWithFormat:@"%d of %d", stackPosition + 1, [clippingStore jcListCount]]]; - //[bezel setCharString:[NSString stringWithFormat:@"%d", stackPosition + 1]]; + [bezel setCharString:[NSString stringWithFormat:@"%d of %d", + 1, [clippingStore jcListCount]]]; + [bezel setText:[clippingStore clippingContentsAtPosition:stackPosition]]; } break; diff --git a/LoginItem/LoginItemsAE.c b/LoginItem/LoginItemsAE.c index 963fe56..21ba886 100755 --- a/LoginItem/LoginItemsAE.c +++ b/LoginItem/LoginItemsAE.c @@ -489,14 +489,12 @@ static OSStatus SendEventToSystemEventsWithParameters( AppleEvent target; AppleEvent event; AppleEvent localReply; - AEDescList results; assert( (reply == NULL) || (reply->descriptorType == typeNull) ); target = kAENull; event = kAENull; localReply = kAENull; - results = kAENull; // Create Apple event. diff --git a/UKPrefsPanel/UKPrefsPanel.m b/UKPrefsPanel/UKPrefsPanel.m index 86d0d8f..83b29f0 100755 --- a/UKPrefsPanel/UKPrefsPanel.m +++ b/UKPrefsPanel/UKPrefsPanel.m @@ -39,7 +39,7 @@ Constructor: -(id) init { - if( self = [super init] ) + if( [super init] ) { tabView = nil; itemsList = [[NSMutableDictionary alloc] init]; @@ -294,11 +294,10 @@ This is simply a list of all tab view items in order. -(NSArray*) toolbarDefaultItemIdentifiers: (NSToolbar *) toolbar { - int itemCount = [tabView numberOfTabViewItems], - x; - NSTabViewItem* theItem = [tabView tabViewItemAtIndex:0]; - //NSMutableArray* defaultItems = [NSMutableArray arrayWithObjects: [theItem identifier], NSToolbarSeparatorItemIdentifier, nil]; - NSMutableArray* defaultItems = [NSMutableArray array]; + int itemCount = [tabView numberOfTabViewItems]; + int x; + NSTabViewItem* theItem; + NSMutableArray* defaultItems = [NSMutableArray array]; for( x = 0; x < itemCount; x++ ) {