From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUrlM-00022y-J8 for qemu-devel@nongnu.org; Thu, 09 Jun 2011 22:47:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUrlL-0000Qw-61 for qemu-devel@nongnu.org; Thu, 09 Jun 2011 22:47:56 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:43913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUrlK-0000Qc-P3 for qemu-devel@nongnu.org; Thu, 09 Jun 2011 22:47:54 -0400 Received: by pzk30 with SMTP id 30so1072884pzk.4 for ; Thu, 09 Jun 2011 19:47:53 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1307646199-39197-1-git-send-email-andreas.faerber@web.de> References: <1307646199-39197-1-git-send-email-andreas.faerber@web.de> From: Alexandre Raymond Date: Thu, 9 Jun 2011 22:47:33 -0400 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] cocoa: Avoid warning related to multiple handleEvent: definitions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Andreas_F=C3=A4rber?= Cc: qemu-devel@nongnu.org Tested-by: Alexandre Raymond That's definitely a better patch ;-) Thanks, Alexandre On Thu, Jun 9, 2011 at 3:03 PM, Andreas F=C3=A4rber wrote: > Avoid compiler confusion as to which method signature to use for the > handleEvent: selector on OSX >=3D 10.6 by making the variable type-safe > as opposed to generic 'id' type. > Requires moving the variable definition to after the class definition. > > ----8<---- > ui/cocoa.m: In function =E2=80=98cocoa_refresh=E2=80=99: > ui/cocoa.m:997: warning: multiple methods named =E2=80=98-handleEvent:=E2= =80=99 found > /System/Library/Frameworks/AppKit.framework/Headers/NSTextInputContext.h:= 84: warning: using =E2=80=98-(BOOL)handleEvent:(NSEvent *)theEvent=E2=80=99 > ui/cocoa.m:272: warning: also found =E2=80=98-(void)handleEvent:(NSEvent = *)event=E2=80=99 > ----8<--- > > Reported-by: Alexandre Raymond > Signed-off-by: Andreas F=C3=A4rber > --- > =C2=A0ui/cocoa.m | =C2=A0 =C2=A03 ++- > =C2=A01 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/ui/cocoa.m b/ui/cocoa.m > index 1c54759..515e684 100644 > --- a/ui/cocoa.m > +++ b/ui/cocoa.m > @@ -63,7 +63,6 @@ typedef struct { > =C2=A0} QEMUScreen; > > =C2=A0NSWindow *normalWindow; > -id cocoaView; > =C2=A0static DisplayChangeListener *dcl; > > =C2=A0int gArgc; > @@ -278,6 +277,8 @@ static int cocoa_keycode_to_qemu(int keycode) > =C2=A0- (QEMUScreen) gscreen; > =C2=A0@end > > +QemuCocoaView *cocoaView; > + > =C2=A0@implementation QemuCocoaView > =C2=A0- (id)initWithFrame:(NSRect)frameRect > =C2=A0{ > -- > 1.7.5.3 > > >