Fix 32-bit Mac build for new warnings
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Sep 2014 01:46:18 +0000 (01:46 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Sep 2014 01:46:18 +0000 (01:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=136624

Reviewed by Darin Adler.

(Jessie already fixed this but my version with typedefs seems a tiny bit cleaner.)

* Carbon/HIViewAdapter.m:
(+[HIViewAdapter bindHIViewToNSView:nsView:]): Need to use explicit casting now.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173415 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/mac/Carbon/HIViewAdapter.m
Source/WebKit/mac/ChangeLog

index 2217515..cd208f7 100644 (file)
@@ -46,9 +46,14 @@ static void SetViewNeedsDisplay(HIViewRef inView, RgnHandle inRegion, Boolean in
 
 static CFMutableDictionaryRef sViewMap;
 
-static void (*oldNSViewSetNeedsDisplayIMP)(id, SEL, BOOL);
-static void (*oldNSViewSetNeedsDisplayInRectIMP)(id, SEL, NSRect);
-static NSView *(*oldNSViewNextValidKeyViewIMP)(id, SEL);
+
+typedef void (*SetNeedsDisplayMethod)(id, SEL, BOOL);
+typedef void (*SetNeedsDisplayInRectMethod)(id, SEL, NSRect);
+typedef NSView *(*NextValidKeyViewMethod)(id, SEL);
+
+static SetNeedsDisplayMethod oldNSViewSetNeedsDisplayIMP;
+static SetNeedsDisplayInRectMethod oldNSViewSetNeedsDisplayInRectIMP;
+static NextValidKeyViewMethod oldNSViewNextValidKeyViewIMP;
 
 static void _webkit_NSView_setNeedsDisplay(id self, SEL _cmd, BOOL flag);
 static void _webkit_NSView_setNeedsDisplayInRect(id self, SEL _cmd, NSRect invalidRect);
@@ -63,19 +68,19 @@ static NSView *_webkit_NSView_nextValidKeyView(id self, SEL _cmd);
         Method setNeedsDisplayMethod = class_getInstanceMethod(objc_getClass("NSView"), @selector(setNeedsDisplay:));
         ASSERT(setNeedsDisplayMethod);
         ASSERT(!oldNSViewSetNeedsDisplayIMP);
-        oldNSViewSetNeedsDisplayIMP = (void (*)(id, SEL, BOOL))(method_setImplementation(setNeedsDisplayMethod, (IMP)(_webkit_NSView_setNeedsDisplay)));
+        oldNSViewSetNeedsDisplayIMP = (SetNeedsDisplayMethod)method_setImplementation(setNeedsDisplayMethod, (IMP)_webkit_NSView_setNeedsDisplay);
 
         // Override -[NSView setNeedsDisplayInRect:]
         Method setNeedsDisplayInRectMethod = class_getInstanceMethod(objc_getClass("NSView"), @selector(setNeedsDisplayInRect:));
         ASSERT(setNeedsDisplayInRectMethod);
         ASSERT(!oldNSViewSetNeedsDisplayInRectIMP);
-        oldNSViewSetNeedsDisplayInRectIMP = (void (*)(id, SEL, NSRect))(method_setImplementation(setNeedsDisplayInRectMethod, (IMP)(_webkit_NSView_setNeedsDisplayInRect)));
+        oldNSViewSetNeedsDisplayInRectIMP = (SetNeedsDisplayInRectMethod)method_setImplementation(setNeedsDisplayInRectMethod, (IMP)_webkit_NSView_setNeedsDisplayInRect);
 
         // Override -[NSView nextValidKeyView]
         Method nextValidKeyViewMethod = class_getInstanceMethod(objc_getClass("NSView"), @selector(nextValidKeyView));
         ASSERT(nextValidKeyViewMethod);
         ASSERT(!oldNSViewNextValidKeyViewIMP);
-        oldNSViewNextValidKeyViewIMP = (NSView *(*)(id, SEL))(method_setImplementation(nextValidKeyViewMethod, (IMP)(_webkit_NSView_nextValidKeyView)));
+        oldNSViewNextValidKeyViewIMP = (NextValidKeyViewMethod)method_setImplementation(nextValidKeyViewMethod, (IMP)_webkit_NSView_nextValidKeyView);
     }
 
     CFDictionaryAddValue(sViewMap, nsView, hiView);
index 54e3f3e..2e08edf 100644 (file)
@@ -1,3 +1,15 @@
+2014-09-08  Maciej Stachowiak  <mjs@apple.com>
+
+        Fix 32-bit Mac build for new warnings
+        https://bugs.webkit.org/show_bug.cgi?id=136624
+
+        Reviewed by Darin Adler.
+        
+        (Jessie already fixed this but my version with typedefs seems a tiny bit cleaner.)
+
+        * Carbon/HIViewAdapter.m:
+        (+[HIViewAdapter bindHIViewToNSView:nsView:]): Need to use explicit casting now.
+
 2014-09-08  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
 
         Remove FILTERS flag