Fixed a triple handful of warnings adium-1.5.10.5
authorEvan Schoenberg
Thu, 14 Nov 2019 16:22:42 -0500
branchadium-1.5.10.5
changeset 5997 d88e6711d0e0
parent 5996 1894c44cfd13
child 5998 c1c33c0ba53a
Fixed a triple handful of warnings
Frameworks/AIUtilities Framework/Source/AIAttributedStringAdditions.m
Frameworks/AIUtilities Framework/Source/AIBorderlessWindow.m
Frameworks/AIUtilities Framework/Source/AIColorAdditions.m
Frameworks/AIUtilities Framework/Source/AIDateFormatterAdditions.m
Frameworks/AIUtilities Framework/Source/AIDockingWindow.m
Frameworks/AIUtilities Framework/Source/AIGenericViewCell.m
Frameworks/AIUtilities Framework/Source/AIImageViewWithImagePicker.m
Frameworks/AIUtilities Framework/Source/AIKeychain.m
Frameworks/AIUtilities Framework/Source/AILinkTrackingController.m
Frameworks/AIUtilities Framework/Source/AIMutableOwnerArray.m
Frameworks/AIUtilities Framework/Source/AIRichTextCoercer.m
Frameworks/AIUtilities Framework/Source/AIRolloverButton.m
Frameworks/AIUtilities Framework/Source/AIStringAdditions.m
Frameworks/AIUtilities Framework/Source/AISystemNetworkDefaults.m
Frameworks/AIUtilities Framework/Source/AIToolbarTabView.m
Frameworks/Adium Framework/Source/ESDebugAILog.h
--- a/Frameworks/AIUtilities Framework/Source/AIAttributedStringAdditions.m	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AIAttributedStringAdditions.m	Thu Nov 14 16:22:42 2019 -0500
@@ -289,7 +289,7 @@
     if ([self length] && [self containsAttachments]) {
         NSInteger							currentLocation = 0;
         NSRange						attachmentRange;
-		NSString					*attachmentCharacterString = [NSString stringWithFormat:@"%C",NSAttachmentCharacter];
+		NSString					*attachmentCharacterString = [NSString stringWithFormat:@"%C",(unichar)NSAttachmentCharacter];
 		
         //find attachment
         attachmentRange = [[self string] rangeOfString:attachmentCharacterString
--- a/Frameworks/AIUtilities Framework/Source/AIBorderlessWindow.m	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AIBorderlessWindow.m	Thu Nov 14 16:22:42 2019 -0500
@@ -68,9 +68,9 @@
     BOOL shouldClose = YES;
     
 	if ([self delegate] && [[self delegate] respondsToSelector:@selector(windowShouldClose:)]) {
-        shouldClose = [(id)[self delegate] windowShouldClose:nil];
+        shouldClose = [(id)[self delegate] windowShouldClose:sender];
     } else if ([self respondsToSelector:@selector(windowShouldClose:)]) { 
-        shouldClose = [(id)self windowShouldClose:nil];
+        shouldClose = [(id)self windowShouldClose:sender];
 	}
 	
     if (shouldClose) {
--- a/Frameworks/AIUtilities Framework/Source/AIColorAdditions.m	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AIColorAdditions.m	Thu Nov 14 16:22:42 2019 -0500
@@ -25,9 +25,11 @@
 static NSArray *defaultValidColors = nil;
 #define VALID_COLORS_ARRAY [[NSArray alloc] initWithObjects:@"aqua", @"aquamarine", @"blue", @"blueviolet", @"brown", @"burlywood", @"cadetblue", @"chartreuse", @"chocolate", @"coral", @"cornflowerblue", @"crimson", @"cyan", @"darkblue", @"darkcyan", @"darkgoldenrod", @"darkgreen", @"darkgrey", @"darkkhaki", @"darkmagenta", @"darkolivegreen", @"darkorange", @"darkorchid", @"darkred", @"darksalmon", @"darkseagreen", @"darkslateblue", @"darkslategrey", @"darkturquoise", @"darkviolet", @"deeppink", @"deepskyblue", @"dimgrey", @"dodgerblue", @"firebrick", @"forestgreen", @"fuchsia", @"gold", @"goldenrod", @"green", @"greenyellow", @"grey", @"hotpink", @"indianred", @"indigo", @"lawngreen", @"lightblue", @"lightcoral", @"lightgreen", @"lightgrey", @"lightpink", @"lightsalmon", @"lightseagreen", @"lightskyblue", @"lightslategrey", @"lightsteelblue", @"lime", @"limegreen", @"magenta", @"maroon", @"mediumaquamarine", @"mediumblue", @"mediumorchid", @"mediumpurple", @"mediumseagreen", @"mediumslateblue", @"mediumspringgreen", @"mediumturquoise", @"mediumvioletred", @"midnightblue", @"navy", @"olive", @"olivedrab", @"orange", @"orangered", @"orchid", @"palegreen", @"paleturquoise", @"palevioletred", @"peru", @"pink", @"plum", @"powderblue", @"purple", @"red", @"rosybrown", @"royalblue", @"saddlebrown", @"salmon", @"sandybrown", @"seagreen", @"sienna", @"silver", @"skyblue", @"slateblue", @"slategrey", @"springgreen", @"steelblue", @"tan", @"teal", @"thistle", @"tomato", @"turquoise", @"violet", @"yellowgreen", nil]
 
+/*
 static const CGFloat ONE_THIRD = 1.0f/3.0f;
 static const CGFloat ONE_SIXTH = 1.0f/6.0f;
 static const CGFloat TWO_THIRD = 2.0f/3.0f;
+*/
 
 static NSMutableDictionary *RGBColorValues = nil;
 
--- a/Frameworks/AIUtilities Framework/Source/AIDateFormatterAdditions.m	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AIDateFormatterAdditions.m	Thu Nov 14 16:22:42 2019 -0500
@@ -355,10 +355,10 @@
 	//build the strings for the parts
 	if (abbreviate) {
 		//Note: after checking with a linguistics student, it appears that we're fine leaving it as w, h, etc... rather than localizing.
-		weeksString		= [NSString stringWithFormat: @"%iw",weeks];
-		daysString		= [NSString stringWithFormat: @"%id",days];
-		hoursString		= [NSString stringWithFormat: @"%ih",hours];
-		minutesString	= [NSString stringWithFormat: @"%im",minutes];
+        weeksString		= [NSString stringWithFormat: @"%liw",(long)weeks];
+		daysString		= [NSString stringWithFormat: @"%id",(int)days];
+		hoursString		= [NSString stringWithFormat: @"%ih",(int)hours];
+		minutesString	= [NSString stringWithFormat: @"%im",(int)minutes];
 		secondsString	= [NSString stringWithFormat: @"%.0fs",seconds];
 	} else {
 		weeksString		= (weeks == 1)		? ONE_WEEK		: [NSString stringWithFormat:MULTIPLE_WEEKS, weeks];
@@ -468,7 +468,7 @@
 					[newFormat appendString:@"%Y"];
 					break;
 				default:
-					[newFormat appendFormat:@"%%%iY", [span length]];
+                    [newFormat appendFormat:@"%%%luY", (unsigned long)[span length]];
 			}
 			
 		} else if (it == 'M') {
--- a/Frameworks/AIUtilities Framework/Source/AIDockingWindow.m	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AIDockingWindow.m	Thu Nov 14 16:22:42 2019 -0500
@@ -37,7 +37,7 @@
 
 @implementation AIDockingWindow
 
-- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag
+- (instancetype)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag
 {
 	if ((self = [super initWithContentRect:contentRect styleMask:aStyle backing:bufferingType defer:flag])) {
 		[self _initDockingWindow];
--- a/Frameworks/AIUtilities Framework/Source/AIGenericViewCell.m	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AIGenericViewCell.m	Thu Nov 14 16:22:42 2019 -0500
@@ -109,7 +109,7 @@
 			 fraction:1.0f];	
 }
 
-- (NSUInteger)hitTestForEvent:(NSEvent *)event inRect:(NSRect)cellFrame ofView:(NSView *)controlView
+- (NSCellHitResult)hitTestForEvent:(NSEvent *)event inRect:(NSRect)cellFrame ofView:(NSView *)controlView
 {	
 	return NSCellHitContentArea;
 }
--- a/Frameworks/AIUtilities Framework/Source/AIImageViewWithImagePicker.m	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AIImageViewWithImagePicker.m	Thu Nov 14 16:22:42 2019 -0500
@@ -119,7 +119,7 @@
 
 	if (pictureTaker) {
 		[pictureTaker close];
-		[pictureTaker release], pictureTaker = nil;
+        [pictureTaker release]; pictureTaker = nil;
 	}
 	
 	delegate = nil;
@@ -144,7 +144,7 @@
 		[pictureTaker setInputImage:inImage];
 	}
 	
-	[activeRecentPicture release], activeRecentPicture = nil;
+    [activeRecentPicture release]; activeRecentPicture = nil;
 }
 
 /*!
@@ -515,8 +515,8 @@
 	[self showPictureTaker];
 }
 
-- (void)pictureTakerDidEnd:(id)inPictureTaker returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
-{	
+- (void)pictureTakerDidEnd:(IKPictureTaker *)inPictureTaker returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
+{
 	if (returnCode == NSOKButton) {
 		NSImage *image = [inPictureTaker outputImage];
 		
--- a/Frameworks/AIUtilities Framework/Source/AIKeychain.m	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AIKeychain.m	Thu Nov 14 16:22:42 2019 -0500
@@ -317,7 +317,7 @@
 		}
 		
 		if (err != noErr) {
-			[self release], self = nil;
+			[self release]; self = nil;
 		}
 	}
 
--- a/Frameworks/AIUtilities Framework/Source/AILinkTrackingController.m	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AILinkTrackingController.m	Thu Nov 14 16:22:42 2019 -0500
@@ -96,7 +96,7 @@
 //Called when the mouse leaves the link
 - (void)mouseExited:(NSEvent *)theEvent
 {
-    [self _setMouseOverLink:NO atPoint:NSMakePoint(0,0)];
+    [self _setMouseOverLink:nil atPoint:NSMakePoint(0,0)];
 }
 
 //Handle a mouse down.  Returns NO if the mouse down event should continue to be processed
@@ -108,7 +108,7 @@
     NSUInteger	charIndex;
     NSRectArray		linkRects = nil;
 	
-    [self _setMouseOverLink:NO atPoint:NSMakePoint(0,0)]; //Remove any tooltips
+    [self _setMouseOverLink:nil atPoint:NSMakePoint(0,0)]; //Remove any tooltips
 	
     //Find clicked char index
     mouseLoc = [controlView convertPoint:[theEvent locationInWindow] fromView:nil];
@@ -415,6 +415,7 @@
 {
     NSAttributedString *copyString = [[[NSAttributedString alloc] initWithString:[(NSURL *)[sender representedObject] absoluteString] attributes:nil] autorelease];
     [[NSPasteboard generalPasteboard] declareTypes:[NSArray arrayWithObject:NSRTFPboardType] owner:nil];
-    [[NSPasteboard generalPasteboard] setData:[copyString RTFFromRange:NSMakeRange(0,[copyString length]) documentAttributes:nil] forType:NSRTFPboardType];
+    [[NSPasteboard generalPasteboard] setData:[copyString RTFFromRange:NSMakeRange(0,[copyString length])
+                                                    documentAttributes:[NSDictionary dictionary]] forType:NSRTFPboardType];
 }
 @end
--- a/Frameworks/AIUtilities Framework/Source/AIMutableOwnerArray.m	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AIMutableOwnerArray.m	Thu Nov 14 16:22:42 2019 -0500
@@ -57,7 +57,7 @@
 
 - (NSString *)description
 {
-	NSMutableString	*desc = [[NSMutableString alloc] initWithFormat:@"<%@: %x: ", NSStringFromClass([self class]), self];
+	NSMutableString	*desc = [[NSMutableString alloc] initWithFormat:@"<%@: %p: ", NSStringFromClass([self class]), self];
 	NSUInteger	i = 0;
 	
 	for (id object in self) {
--- a/Frameworks/AIUtilities Framework/Source/AIRichTextCoercer.m	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AIRichTextCoercer.m	Thu Nov 14 16:22:42 2019 -0500
@@ -55,9 +55,11 @@
 		}
 	}
 
+    /*
 	enum { RIGHTWARDS_ARROW = 0x2192 };
 	NSLog(@"%s: Input '%@' %C Class %@ %C Result '%@'", __PRETTY_FUNCTION__, input, RIGHTWARDS_ARROW, class, RIGHTWARDS_ARROW, result);
-
+     */
+    
 	return result;
 }
 + (id)coercePlainText:(NSString *)input toClass:(Class)class
--- a/Frameworks/AIUtilities Framework/Source/AIRolloverButton.m	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AIRolloverButton.m	Thu Nov 14 16:22:42 2019 -0500
@@ -122,7 +122,7 @@
 		BOOL	mouseInside = NSPointInRect(localPoint, myFrame);
 		
 		trackingTag = [self addTrackingRect:trackRect owner:self userData:nil assumeInside:mouseInside];
-		if (mouseInside) [self mouseEntered:nil];
+		if (mouseInside) [self mouseEntered:[[[NSEvent alloc] init] autorelease]];
 	}
 }
 
--- a/Frameworks/AIUtilities Framework/Source/AIStringAdditions.m	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AIStringAdditions.m	Thu Nov 14 16:22:42 2019 -0500
@@ -187,7 +187,7 @@
 
 	for (i = 0 ; i < length ; i++) {
 		/* Offset by the desired amount */
-		[newString appendFormat:@"%C",([self characterAtIndex:i] + offset)];
+		[newString appendFormat:@"%C",(unichar)([self characterAtIndex:i] + offset)];
 	}
 	
 	return newString;
@@ -756,7 +756,7 @@
 	//^-----^   <-Returns this substring. (Trailing zeroes are deleted.)
 	//42.000000
 	//^^        <-Returns this substring (everything before the decimal point) for a whole number.
-	NSString *format = numDigits ? [NSString stringWithFormat:@"%%.%uf", numDigits] : @"%f";
+	NSString *format = numDigits ? [NSString stringWithFormat:@"%%.%uf", (unsigned int)numDigits] : @"%f";
 	NSString *str = [NSString stringWithFormat:format, (double)f];
 	NSUInteger i = [str length];
 	while (i-- > 0) {
--- a/Frameworks/AIUtilities Framework/Source/AISystemNetworkDefaults.m	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AISystemNetworkDefaults.m	Thu Nov 14 16:22:42 2019 -0500
@@ -140,8 +140,8 @@
 						// Work around <rdar://problem/5530166>.  This dummy call to 
 						// CFNetworkCopyProxiesForURL initialise some state within CFNetwork 
 						// that is required by CFNetworkCopyProxiesForAutoConfigurationScript.
-						CFRelease(CFNetworkCopyProxiesForURL(url, NULL));
-						
+                        CFRelease(CFNetworkCopyProxiesForURL(url, (CFDictionaryRef)@{}));
+
 						CFErrorRef error = NULL;
 						proxies = [(NSArray *)CFNetworkCopyProxiesForAutoConfigurationScript((CFStringRef)scriptStr, url, &error) autorelease];	
 
--- a/Frameworks/AIUtilities Framework/Source/AIToolbarTabView.m	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AIToolbarTabView.m	Thu Nov 14 16:22:42 2019 -0500
@@ -144,7 +144,7 @@
 {
 	//Update the selected toolbar item (10.3 or higher)
 	if ([[[self window] toolbar] respondsToSelector:@selector(setSelectedItemIdentifier:)]) {
-		[[[self window] toolbar] setSelectedItemIdentifier:[NSString stringWithFormat:@"%i",[self indexOfTabViewItem:tabViewItem]]];
+		[[[self window] toolbar] setSelectedItemIdentifier:[NSString stringWithFormat:@"%i",(int)[self indexOfTabViewItem:tabViewItem]]];
 	}
 
 	if (tabViewItem != [self selectedTabViewItem]) {
--- a/Frameworks/Adium Framework/Source/ESDebugAILog.h	Mon Nov 04 10:23:55 2019 +0000
+++ b/Frameworks/Adium Framework/Source/ESDebugAILog.h	Thu Nov 14 16:22:42 2019 -0500
@@ -21,9 +21,9 @@
 #define AILogWithPrefix(sig, fmt, args...) do { if(__builtin_expect(AIDebugLoggingEnabled, 0)) AILogWithPrefix_impl(sig, fmt, ##args); } while(0)
 #define AILogBacktrace() do { if(__builtin_expect(AIDebugLoggingEnabled, 0)) AILogBacktrace_impl(); } while(0)
 #define AILogWithSignature(fmt, args...) AILogWithSignature_impl(__PRETTY_FUNCTION__, __LINE__, fmt, ##args);
-void AIEnableDebugLogging();
-BOOL AIDebugLoggingIsEnabled();
+void AIEnableDebugLogging(void);
+BOOL AIDebugLoggingIsEnabled(void);
 void AILogWithSignature_impl (const char *function, int line, NSString *format, ...) __attribute__((format(__NSString__, 3, 4)));
 void AILogWithPrefix_impl (const char *signature, NSString *format, ...) __attribute__((format(__NSString__, 2, 3)));
 void AILog_impl (NSString *format, ...) __attribute__((format(__NSString__, 1, 2)));
-void AILogBacktrace_impl();
+void AILogBacktrace_impl(void);