adium 4585:6c1dd8c3ee4a: Avoid a lot of false positives of the s...
commits at adium.im
commits at adium.im
Sun Jan 29 01:53:23 UTC 2012
details: http://hg.adium.im/adium/rev/6c1dd8c3ee4a
revision: 4585:6c1dd8c3ee4a
branch: (none)
author: Thijs Alkemade <thijsalkemade at gmail.com>
date: Sun Jan 29 02:53:09 2012 +0100
Avoid a lot of false positives of the static analyzer.
diffs (234 lines):
diff -r f68138d15637 -r 6c1dd8c3ee4a Frameworks/AIUtilities Framework/Source/AIImageTextCell.m
--- a/Frameworks/AIUtilities Framework/Source/AIImageTextCell.m Sun Jan 29 01:58:12 2012 +0100
+++ b/Frameworks/AIUtilities Framework/Source/AIImageTextCell.m Sun Jan 29 02:53:09 2012 +0100
@@ -432,8 +432,8 @@
//Draw the substring
[attributedSubString drawInRect:cellFrame];
- [attributedSubString release];
}
+ [attributedSubString release];
}
[NSGraphicsContext restoreGraphicsState];
diff -r f68138d15637 -r 6c1dd8c3ee4a Frameworks/Adium Framework/Source/AIAccount.h
--- a/Frameworks/Adium Framework/Source/AIAccount.h Sun Jan 29 01:58:12 2012 +0100
+++ b/Frameworks/Adium Framework/Source/AIAccount.h Sun Jan 29 02:53:09 2012 +0100
@@ -202,6 +202,7 @@
- (NSString *)accountWillSetUID:(NSString *)proposedUID;
- (void)didChangeUID;
- (void)willBeDeleted;
+- (id<AIAccountControllerRemoveConfirmationDialog>)confirmationDialogForAccountDeletion __attribute__((objc_method_family(new)));
@property (readonly, nonatomic) id<AIAccountControllerRemoveConfirmationDialog> confirmationDialogForAccountDeletion;
@property (readonly, nonatomic) NSAlert *alertForAccountDeletion;
- (void)alertForAccountDeletion:(id<AIAccountControllerRemoveConfirmationDialog>)dialog didReturn:(NSInteger)returnCode;
diff -r f68138d15637 -r 6c1dd8c3ee4a Frameworks/Adium Framework/Source/AIFileTransferControllerProtocol.h
--- a/Frameworks/Adium Framework/Source/AIFileTransferControllerProtocol.h Sun Jan 29 01:58:12 2012 +0100
+++ b/Frameworks/Adium Framework/Source/AIFileTransferControllerProtocol.h Sun Jan 29 02:53:09 2012 +0100
@@ -55,7 +55,7 @@
@protocol AIFileTransferController <AIController>
//Should be the only vendor of new ESFileTransfer* objects, as it creates, tracks, and returns them
-- (ESFileTransfer *)newFileTransferWithContact:(AIListContact *)inContact forAccount:(AIAccount *)inAccount type:(AIFileTransferType)type;
+- (ESFileTransfer *)newFileTransferWithContact:(AIListContact *)inContact forAccount:(AIAccount *)inAccount type:(AIFileTransferType)type __attribute__((objc_method_family(none)));
- (NSArray *)fileTransferArray;
diff -r f68138d15637 -r 6c1dd8c3ee4a Frameworks/Adium Framework/Source/AdiumAuthorization.h
--- a/Frameworks/Adium Framework/Source/AdiumAuthorization.h Sun Jan 29 01:58:12 2012 +0100
+++ b/Frameworks/Adium Framework/Source/AdiumAuthorization.h Sun Jan 29 02:53:09 2012 +0100
@@ -23,7 +23,7 @@
}
+ (void)start;
-+ (id)showAuthorizationRequestWithDict:(NSDictionary *)inDict forAccount:(AIAccount *)inAccount;
++ (id)showAuthorizationRequestWithDict:(NSDictionary *)inDict forAccount:(AIAccount *)inAccount __attribute__((ns_returns_retained));
+ (void)closeAuthorizationForUIHandle:(id)handle;
@end
diff -r f68138d15637 -r 6c1dd8c3ee4a Frameworks/Adium Framework/Source/CSNewContactAlertWindowController.h
--- a/Frameworks/Adium Framework/Source/CSNewContactAlertWindowController.h Sun Jan 29 01:58:12 2012 +0100
+++ b/Frameworks/Adium Framework/Source/CSNewContactAlertWindowController.h Sun Jan 29 02:53:09 2012 +0100
@@ -62,7 +62,7 @@
onWindow:(NSWindow *)parentWindow
notifyingTarget:(id)inTarget
configureForGlobal:(BOOL)inConfigureForGlobal
- defaultEventID:(NSString *)inDefaultEventID;
+ defaultEventID:(NSString *)inDefaultEventID __attribute__((objc_method_family(new)));
- (IBAction)cancel:(id)sender;
- (IBAction)save:(id)sender;
diff -r f68138d15637 -r 6c1dd8c3ee4a Frameworks/Adium Framework/Source/ESTextAndButtonsWindowController.h
--- a/Frameworks/Adium Framework/Source/ESTextAndButtonsWindowController.h Sun Jan 29 01:58:12 2012 +0100
+++ b/Frameworks/Adium Framework/Source/ESTextAndButtonsWindowController.h Sun Jan 29 02:53:09 2012 +0100
@@ -67,7 +67,7 @@
andMessage:(NSAttributedString *)inMessage
image:(NSImage *)inImage
target:(id)inTarget
- userInfo:(id)inUserInfo;
+ userInfo:(id)inUserInfo __attribute__((objc_method_family(new)));
+ (id)showTextAndButtonsWindowWithTitle:(NSString *)inTitle
defaultButton:(NSString *)inDefaultButton
@@ -77,8 +77,8 @@
withMessageHeader:(NSString *)inMessageHeader
andMessage:(NSAttributedString *)inMessage
target:(id)inTarget
- userInfo:(id)inUserInfo;
-+ (id)controller;
+ userInfo:(id)inUserInfo __attribute__((objc_method_family(new)));
++ (id)controller __attribute__((objc_method_family(new)));
- (void)changeWindowToTitle:(NSString *)inTitle
defaultButton:(NSString *)inDefaultButton
diff -r f68138d15637 -r 6c1dd8c3ee4a Plugins/Bonjour/libezv/Simple HTTP Server/AsyncSocket.m
--- a/Plugins/Bonjour/libezv/Simple HTTP Server/AsyncSocket.m Sun Jan 29 01:58:12 2012 +0100
+++ b/Plugins/Bonjour/libezv/Simple HTTP Server/AsyncSocket.m Sun Jan 29 02:53:09 2012 +0100
@@ -39,7 +39,7 @@
@interface AsyncSocket ()
// Socket Implementation
-- (CFSocketRef) createAcceptSocketForAddress:(NSData *)addr error:(NSError **)errPtr;
+- (CFSocketRef) createAcceptSocketForAddress:(NSData *)addr error:(NSError **)errPtr __attribute__((cf_returns_retained));
- (BOOL) createSocketForAddress:(NSData *)remoteAddr error:(NSError **)errPtr;
- (BOOL) attachSocketsToRunLoop:(NSRunLoop *)runLoop error:(NSError **)errPtr;
- (BOOL) configureSocketAndReturnError:(NSError **)errPtr;
diff -r f68138d15637 -r 6c1dd8c3ee4a Plugins/Purple Service/CBPurpleAccount.h
--- a/Plugins/Purple Service/CBPurpleAccount.h Sun Jan 29 01:58:12 2012 +0100
+++ b/Plugins/Purple Service/CBPurpleAccount.h Sun Jan 29 02:53:09 2012 +0100
@@ -135,7 +135,7 @@
- (void)removeContact:(AIListContact *)theContact;
-- (NSWindowController *)authorizationRequestWithDict:(NSDictionary*)dict;
+- (NSWindowController *)authorizationRequestWithDict:(NSDictionary*)dict __attribute__((ns_returns_retained));
- (void)addChat:(AIChat *)chat;
- (void)typingUpdateForIMChat:(AIChat *)chat typing:(NSNumber *)typing;
@@ -161,7 +161,7 @@
- (void)destroyFileTransfer:(ESFileTransfer *)fileTransfer;
- (ESFileTransfer *)newFileTransferObjectWith:(NSString *)destinationUID
size:(unsigned long long)inSize
- remoteFilename:(NSString *)remoteFilename;
+ remoteFilename:(NSString *)remoteFilename __attribute__((objc_method_family(none)));
- (BOOL)allowFileTransferWithListObject:(AIListObject *)inListObject;
- (BOOL)canSendFolders;
diff -r f68138d15637 -r 6c1dd8c3ee4a Plugins/Purple Service/ESPurpleFileReceiveRequestController.h
--- a/Plugins/Purple Service/ESPurpleFileReceiveRequestController.h Sun Jan 29 01:58:12 2012 +0100
+++ b/Plugins/Purple Service/ESPurpleFileReceiveRequestController.h Sun Jan 29 02:53:09 2012 +0100
@@ -20,6 +20,6 @@
@interface ESPurpleFileReceiveRequestController : NSObject {
}
-+ (ESPurpleFileReceiveRequestController *)showFileReceiveWindowWithDict:(NSDictionary *)inDict;
++ (ESPurpleFileReceiveRequestController *)showFileReceiveWindowWithDict:(NSDictionary *)inDict __attribute__((objc_method_family(new)));
@end
diff -r f68138d15637 -r 6c1dd8c3ee4a Plugins/Purple Service/ESPurpleRequestActionController.h
--- a/Plugins/Purple Service/ESPurpleRequestActionController.h Sun Jan 29 01:58:12 2012 +0100
+++ b/Plugins/Purple Service/ESPurpleRequestActionController.h Sun Jan 29 02:53:09 2012 +0100
@@ -24,6 +24,6 @@
NSDictionary *theInfoDict;
}
-+ (ESPurpleRequestActionController *)showActionWindowWithDict:(NSDictionary *)infoDict;
++ (ESPurpleRequestActionController *)showActionWindowWithDict:(NSDictionary *)infoDict __attribute__((objc_method_family(new)));
@end
diff -r f68138d15637 -r 6c1dd8c3ee4a Plugins/Purple Service/ESPurpleRequestWindowController.h
--- a/Plugins/Purple Service/ESPurpleRequestWindowController.h Sun Jan 29 01:58:12 2012 +0100
+++ b/Plugins/Purple Service/ESPurpleRequestWindowController.h Sun Jan 29 02:53:09 2012 +0100
@@ -31,7 +31,7 @@
NSValue *userDataValue;
}
-+ (ESPurpleRequestWindowController *)showInputWindowWithDict:(NSDictionary *)infoDict;
++ (ESPurpleRequestWindowController *)showInputWindowWithDict:(NSDictionary *)infoDict __attribute__((objc_method_family(new)));
- (id)initWithWindowNibName:(NSString *)windowNibName withDict:(NSDictionary *)infoDict multiline:(BOOL)multiline;
- (IBAction)pressedButton:(id)sender;
diff -r f68138d15637 -r 6c1dd8c3ee4a Plugins/WebKit Message View/AIWebkitMessageViewStyle.m
--- a/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m Sun Jan 29 01:58:12 2012 +0100
+++ b/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m Sun Jan 29 02:53:09 2012 +0100
@@ -448,6 +448,8 @@
} else {
usingCustomTemplateHTML = YES;
+ NSAssert(baseHTML != nil, @"The impossible happened!");
+
if ([baseHTML rangeOfString:@"function imageCheck()" options:NSLiteralSearch].location != NSNotFound) {
/* This doesn't quite fix image swapping on styles with broken image swapping due to custom HTML templates,
* but it improves it. For some reason, the result of using our normal template.html functions is that
diff -r f68138d15637 -r 6c1dd8c3ee4a Source/AIListLayoutWindowController.h
--- a/Source/AIListLayoutWindowController.h Sun Jan 29 01:58:12 2012 +0100
+++ b/Source/AIListLayoutWindowController.h Sun Jan 29 02:53:09 2012 +0100
@@ -61,7 +61,7 @@
NSString *layoutName;
}
-+ (id)editListLayoutWithName:(NSString *)inName onWindow:(NSWindow *)parentWindow notifyingTarget:(id)inTarget;
++ (id)editListLayoutWithName:(NSString *)inName onWindow:(NSWindow *)parentWindow notifyingTarget:(id)inTarget __attribute__((objc_method_family(new)));
- (IBAction)cancel:(id)sender;
- (IBAction)okay:(id)sender;
- (void)preferenceChanged:(id)sender;
diff -r f68138d15637 -r 6c1dd8c3ee4a Source/AIListThemeWindowController.h
--- a/Source/AIListThemeWindowController.h Sun Jan 29 01:58:12 2012 +0100
+++ b/Source/AIListThemeWindowController.h Sun Jan 29 02:53:09 2012 +0100
@@ -98,7 +98,7 @@
NSString *themeName;
}
-+ (id)editListThemeWithName:(NSString *)inName onWindow:(NSWindow *)parentWindow notifyingTarget:(id)inTarget;
++ (id)editListThemeWithName:(NSString *)inName onWindow:(NSWindow *)parentWindow notifyingTarget:(id)inTarget __attribute__((objc_method_family(new)));
- (IBAction)cancel:(id)sender;
- (IBAction)okay:(id)sender;
- (void)preferenceChanged:(id)sender;
diff -r f68138d15637 -r 6c1dd8c3ee4a Source/AILoginWindowController.h
--- a/Source/AILoginWindowController.h Sun Jan 29 01:58:12 2012 +0100
+++ b/Source/AILoginWindowController.h Sun Jan 29 02:53:09 2012 +0100
@@ -33,7 +33,7 @@
NSTimer *loginTimer;
}
-+ (AILoginWindowController *)loginWindowControllerWithOwner:(id)inOwner;
++ (AILoginWindowController *)loginWindowControllerWithOwner:(id)inOwner __attribute__((objc_method_family(new)));
- (void)disableLoginTimeout;
@end
diff -r f68138d15637 -r 6c1dd8c3ee4a Source/AINewBookmarkWindowController.h
--- a/Source/AINewBookmarkWindowController.h Sun Jan 29 01:58:12 2012 +0100
+++ b/Source/AINewBookmarkWindowController.h Sun Jan 29 02:53:09 2012 +0100
@@ -33,7 +33,7 @@
+ (AINewBookmarkWindowController *)promptForNewBookmarkForChat:(AIChat *)inChat
onWindow:(NSWindow*)parentWindow
- notifyingTarget:(id)inTarget;
+ notifyingTarget:(id)inTarget __attribute__((objc_method_family(new)));
- (IBAction)add:(id)sender;
- (IBAction)cancel:(id)sender;
diff -r f68138d15637 -r 6c1dd8c3ee4a Source/AINewGroupWindowController.h
--- a/Source/AINewGroupWindowController.h Sun Jan 29 01:58:12 2012 +0100
+++ b/Source/AINewGroupWindowController.h Sun Jan 29 02:53:09 2012 +0100
@@ -27,7 +27,7 @@
AIListGroup *group;
}
-+ (AINewGroupWindowController *)promptForNewGroupOnWindow:(NSWindow *)parentWindow;
++ (AINewGroupWindowController *)promptForNewGroupOnWindow:(NSWindow *)parentWindow __attribute__((objc_method_family(new)));
- (AIListGroup *)group;
- (IBAction)cancel:(id)sender;
- (IBAction)addGroup:(id)sender;
diff -r f68138d15637 -r 6c1dd8c3ee4a Source/XtrasInstaller.h
--- a/Source/XtrasInstaller.h Sun Jan 29 01:58:12 2012 +0100
+++ b/Source/XtrasInstaller.h Sun Jan 29 02:53:09 2012 +0100
@@ -30,7 +30,7 @@
-(IBAction)cancel:(id)sender;
-(void)installXtraAtURL:(NSURL *)url;
-+(XtrasInstaller *)installer;
++(XtrasInstaller *)installer __attribute__((objc_method_family(new)));
@property (retain) NSURLDownload *download;
@property (retain) NSString *dest;
More information about the commits
mailing list