diff --git a/ApplicationController.h b/ApplicationController.h index dc3da26..64d1c13 100644 --- a/ApplicationController.h +++ b/ApplicationController.h @@ -12,7 +12,7 @@ @class PBCLIProxy; @class PBCloneRepositoryPanel; -@interface ApplicationController : NSObject +@interface ApplicationController : NSObject { IBOutlet NSWindow *window; IBOutlet id firstResponder; diff --git a/DBPrefsWindowController.h b/DBPrefsWindowController.h index 5cb711e..b013ac7 100644 --- a/DBPrefsWindowController.h +++ b/DBPrefsWindowController.h @@ -42,7 +42,7 @@ #import -@interface DBPrefsWindowController : NSWindowController { +@interface DBPrefsWindowController : NSWindowController { NSMutableArray *toolbarIdentifiers; NSMutableDictionary *toolbarViews; NSMutableDictionary *toolbarItems; diff --git a/DBPrefsWindowController.m b/DBPrefsWindowController.m index 58b4d6b..c5dbc08 100644 --- a/DBPrefsWindowController.m +++ b/DBPrefsWindowController.m @@ -370,7 +370,7 @@ static DBPrefsWindowController *_sharedPrefsWindowController = nil; NSEnumerator *subviewsEnum = [[contentSubview subviews] reverseObjectEnumerator]; // This is our visible view. Just get past it. - subview = [subviewsEnum nextObject]; + [subviewsEnum nextObject]; // Remove everything else. There should be just one, but // if the user does a lot of fast clicking, we might have diff --git a/PBCLIProxy.m b/PBCLIProxy.m index e6f2e50..08a87fe 100644 --- a/PBCLIProxy.m +++ b/PBCLIProxy.m @@ -80,9 +80,11 @@ suggestion], NSLocalizedFailureReasonErrorKey, recoveryInfo, NSLocalizedRecoverySuggestionErrorKey, nil]; - *error = [NSError errorWithDomain:PBCLIProxyErrorDomain code:errCode userInfo:userInfo]; - - fprintf(stderr, "\t%s\n", [[*error localizedFailureReason] UTF8String]); + if (error) + { + *error = [NSError errorWithDomain:PBCLIProxyErrorDomain code:errCode userInfo:userInfo]; + fprintf(stderr, "\t%s\n", [[*error localizedFailureReason] UTF8String]); + } } // NSLog(@"document = %@ at path = %@", document, repositoryPath); diff --git a/PBGitRevisionCell.m b/PBGitRevisionCell.m index 0a129f1..79a26e7 100644 --- a/PBGitRevisionCell.m +++ b/PBGitRevisionCell.m @@ -189,7 +189,7 @@ { [[NSColor blackColor] setStroke]; - NSRect lastRect; + NSRect lastRect = NSMakeRect(0, 0, 0, 0); int index = 0; for (NSValue *rectValue in [self rectsForRefsinRect:*refRect]) { diff --git a/PBGitSidebarController.h b/PBGitSidebarController.h index 52357ca..1ae59c0 100644 --- a/PBGitSidebarController.h +++ b/PBGitSidebarController.h @@ -14,7 +14,7 @@ @class PBGitCommitController; @class ApplicationController; -@interface PBGitSidebarController : PBViewController { +@interface PBGitSidebarController : PBViewController { IBOutlet NSWindow *window; IBOutlet NSOutlineView *sourceView; IBOutlet NSView *sourceListControlsView; diff --git a/PBGitWindowController.h b/PBGitWindowController.h index dec5c9c..78a1c98 100644 --- a/PBGitWindowController.h +++ b/PBGitWindowController.h @@ -11,7 +11,7 @@ @class PBViewController, PBGitSidebarController, PBGitHistoryController; -@interface PBGitWindowController : NSWindowController { +@interface PBGitWindowController : NSWindowController { __weak PBGitRepository* repository; __weak PBViewController *contentController; diff --git a/PBRepositoryDocumentController.m b/PBRepositoryDocumentController.m index cbc777b..35dda88 100644 --- a/PBRepositoryDocumentController.m +++ b/PBRepositoryDocumentController.m @@ -72,7 +72,8 @@ NSString * reason = @"It does not appear to be a git repository."; NSString * suggestion = @"Make sure there really is a \u201c.git\u201d folder somewhere in the path hierarchy you are trying to open"; NSDictionary * errInfo = [NSDictionary dictionaryWithObjectsAndKeys:reason, NSLocalizedFailureReasonErrorKey, suggestion, NSLocalizedRecoverySuggestionErrorKey, nil]; - *outError = [NSError errorWithDomain:NSCocoaErrorDomain code:PBNotAGitRepositoryErrorCode userInfo:errInfo]; + if (outError) + *outError = [NSError errorWithDomain:NSCocoaErrorDomain code:PBNotAGitRepositoryErrorCode userInfo:errInfo]; return nil; } return [super openDocumentWithContentsOfURL:absoluteURL display:displayDocument error:outError]; diff --git a/gitx_askpasswd_main.m b/gitx_askpasswd_main.m index 3e77140..1da6044 100644 --- a/gitx_askpasswd_main.m +++ b/gitx_askpasswd_main.m @@ -18,7 +18,7 @@ #define PASSLABELHEIGHT 16.0 -@interface GAPAppDelegate : NSObject +@interface GAPAppDelegate : NSObject { NSPanel* mPasswordPanel; NSSecureTextField* mPasswordField;