From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQobW-0006gu-0N for qemu-devel@nongnu.org; Sun, 29 May 2011 18:37:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQobV-0002fi-80 for qemu-devel@nongnu.org; Sun, 29 May 2011 18:37:01 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:51197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQobV-0002fe-4h for qemu-devel@nongnu.org; Sun, 29 May 2011 18:37:01 -0400 Received: by qwj8 with SMTP id 8so1821987qwj.4 for ; Sun, 29 May 2011 15:37:00 -0700 (PDT) From: Alexandre Raymond Date: Sun, 29 May 2011 18:36:19 -0400 Message-Id: <1306708579-16268-1-git-send-email-cerbere@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH] Cocoa: avoid warning related to multiple method definitions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexandre Raymond , andreas.faerber@web.de This fix forces a message to be sent to the handleEvent method of the QemuCocoaView class instead of letting the system determine the right method. This is caused by the fact that the cocoaView variable is a generic 'id'. ----8<---- ui/cocoa.m: In function ‘cocoa_refresh’: ui/cocoa.m:997: warning: multiple methods named ‘-handleEvent:’ found /System/Library/Frameworks/AppKit.framework/Headers/NSTextInputContext.h:84: warning: using ‘-(BOOL)handleEvent:(NSEvent *)theEvent’ ui/cocoa.m:272: warning: also found ‘-(void)handleEvent:(NSEvent *)event’ ----8<--- Signed-off-by: Alexandre Raymond --- ui/cocoa.m | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index e1312d3..1975011 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -994,7 +994,7 @@ static void cocoa_refresh(DisplayState *ds) event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:distantPast inMode: NSDefaultRunLoopMode dequeue:YES]; if (event != nil) { - [cocoaView handleEvent:event]; + [(QemuCocoaView *) cocoaView handleEvent:event]; } } while(event != nil); vga_hw_update(); -- 1.7.5