Fixed a few more warnings adium-1.5.10.5
authorEvan Schoenberg
Thu, 14 Nov 2019 18:10:18 -0500
branchadium-1.5.10.5
changeset 6003 6e8c6761ee0d
parent 6002 66aac3254a5d
child 6004 78f15a50a998
Fixed a few more warnings
Frameworks/Adium Framework/Source/AIColorPickerSliders.m
Frameworks/Adium Framework/Source/AIStatusControllerProtocol.h
Frameworks/Adium Framework/Source/AIToolbar.m
Source/AIDictionaryDebug.m
Source/AIScannerDebug.m
Source/AIStringDebug.m
--- a/Frameworks/Adium Framework/Source/AIColorPickerSliders.m	Thu Nov 14 16:26:13 2019 -0500
+++ b/Frameworks/Adium Framework/Source/AIColorPickerSliders.m	Thu Nov 14 18:10:18 2019 -0500
@@ -53,7 +53,8 @@
 - (void)_setupProfileUI
 {
 	//Must be sure to the original implementation
-	method_invoke(self, class_getInstanceMethod([AIColorPickerSliders class], @selector(_setupProfileUI)));
+    static void (*__setupProfileUI_method_invoke)(id, Method) = (void (*)(id, Method)) method_invoke;
+	__setupProfileUI_method_invoke(self, class_getInstanceMethod([AIColorPickerSliders class], @selector(_setupProfileUI)));
 
 	if (sliderModePopUp && [sliderModePopUp isKindOfClass:[NSPopUpButton class]]) {
 		NSMenu			*menu = [sliderModePopUp menu];
--- a/Frameworks/Adium Framework/Source/AIStatusControllerProtocol.h	Thu Nov 14 16:26:13 2019 -0500
+++ b/Frameworks/Adium Framework/Source/AIStatusControllerProtocol.h	Thu Nov 14 18:10:18 2019 -0500
@@ -145,5 +145,4 @@
 - (AIStatusGroup *)rootStateGroup;
 
 - (void)savedStatusesChanged;
-- (void)statusStateDidSetUniqueStatusID;
 @end
--- a/Frameworks/Adium Framework/Source/AIToolbar.m	Thu Nov 14 16:26:13 2019 -0500
+++ b/Frameworks/Adium Framework/Source/AIToolbar.m	Thu Nov 14 18:10:18 2019 -0500
@@ -66,7 +66,8 @@
 	}
 
 	//call the unswizzled implementation now that we're done with our additions
-	method_invoke(self, class_getInstanceMethod([AIToolbar class], @selector(deallocWithNotifications)));
+    static void (*_deallocWithNotifications_method_invoke)(id, Method) = (void (*)(id, Method)) method_invoke;
+	_deallocWithNotifications_method_invoke(self, class_getInstanceMethod([AIToolbar class], @selector(deallocWithNotifications)));
 }
 
 @end
--- a/Source/AIDictionaryDebug.m	Thu Nov 14 16:26:13 2019 -0500
+++ b/Source/AIDictionaryDebug.m	Thu Nov 14 18:10:18 2019 -0500
@@ -57,7 +57,8 @@
 	NSAssert3(object != nil, @"%@: Attempted to set %@ for %@",self,object,key);
 	NSAssert3(key != nil, @"%@: Attempted to set %@ for %@",self,object,key);
 
-	method_invoke(self, class_getInstanceMethod([AIDictionaryDebug class], @selector(setObject:forKey:)), object, key);
+    static void (*_setObjectForKey_method_invoke)(id, Method, id, id) = (void (*)(id, Method, id, id)) method_invoke;
+	_setObjectForKey_method_invoke(self, class_getInstanceMethod([AIDictionaryDebug class], @selector(setObject:forKey:)), object, key);
 }
 
 - (void)removeObjectForKey:(id)key
@@ -65,7 +66,8 @@
 	if (!key) [AIDictionaryDebug breakpoint];
 	NSAssert1(key != nil, @"%@: Attempted to remove a nil key",self);
 
-	method_invoke(self, class_getInstanceMethod([AIDictionaryDebug class], @selector(removeObjectForKey:)), key);
+    static void (*_removeObjectForKey_method_invoke)(id, Method, id) = (void (*)(id, Method, id)) method_invoke;
+	_removeObjectForKey_method_invoke(self, class_getInstanceMethod([AIDictionaryDebug class], @selector(removeObjectForKey:)), key);
 }
 
 #endif
--- a/Source/AIScannerDebug.m	Thu Nov 14 16:26:13 2019 -0500
+++ b/Source/AIScannerDebug.m	Thu Nov 14 18:10:18 2019 -0500
@@ -27,16 +27,20 @@
 }
 
 //These will be exchanged with the ones in NSScanner, so to get the originals we need to call the AIScannerDebug ones
-+ (id)scannerWithString:(NSString *)aString
++ (instancetype)scannerWithString:(NSString *)aString
 {
 	NSParameterAssert(aString != nil);
-	return method_invoke(self, class_getClassMethod([AIScannerDebug class], @selector(scannerWithString:)), aString);
+    
+    static id (*_scannerWithString_method_invoke)(id, Method, NSString *) = (id (*)(id, Method, NSString *)) method_invoke;
+	return _scannerWithString_method_invoke(self, class_getClassMethod([AIScannerDebug class], @selector(scannerWithString:)), aString);
 }
 
-- (id)initWithString:(NSString *)aString
+- (instancetype)initWithString:(NSString *)aString
 {
 	NSParameterAssert(aString != nil);
-	return method_invoke(self, class_getInstanceMethod([AIScannerDebug class], @selector(initWithString:)), aString);
+    
+    static id (*_initWithString_method_invoke)(id, Method, NSString *) = (id (*)(id, Method, NSString *)) method_invoke;
+	return _initWithString_method_invoke(self, class_getInstanceMethod([AIScannerDebug class], @selector(initWithString:)), aString);
 }
 
 @end
--- a/Source/AIStringDebug.m	Thu Nov 14 16:26:13 2019 -0500
+++ b/Source/AIStringDebug.m	Thu Nov 14 18:10:18 2019 -0500
@@ -52,7 +52,9 @@
 - (NSString *)stringByAppendingString:(NSString *)string
 {
 	if (!string) [AIStringDebug breakpoint];
-	return method_invoke(self, class_getInstanceMethod([AIStringDebug class], @selector(stringByAppendingString:)), string);
+
+    static NSString * (*_stringByAppendingString_method_invoke)(id, Method, NSString *) = (NSString * (*)(id, Method, NSString *)) method_invoke;
+	return _stringByAppendingString_method_invoke(self, class_getInstanceMethod([AIStringDebug class], @selector(stringByAppendingString:)), string);
 }
 
 #endif