[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnustep-gui cleanups
From: |
Nicola Pero |
Subject: |
Re: [PATCH] gnustep-gui cleanups |
Date: |
Thu, 30 Jan 2003 04:51:24 +0000 (GMT) |
> I've started with resolve some text system problems, but end up with
> this patch :)
>
> Preparing to upcoming 0.8.5 release it might be useful to have clean
> compiling of gui. The following patch is a fix of some compiler warnings
> (WARNINGS attach).
Thanks! :-)
Yes - we shouldn't have all those warnings around - thanks for fixing
them. I applied your patches :-)
A small comment - the following warnings are spurious, and are generated
by a bug in the compiler. Casts from (id <GSPasteBoard>) to (id) were
broken in GCC compilers before 3.3, which would ignore them. I fixed
these casts on GCC CVS HEAD on Sep 17 2002. So, to remove those warnings
we don't need to change the protocols ... but upgrade the compiler :-)
NSMenu.m: In function `-[NSMenu insertItem:atIndex:]':
NSMenu.m:267: warning: method `conformsToProtocol:' not implemented by
protocol
NSPasteboard.m: In function `+[NSPasteboard _pbs]':
NSPasteboard.m:163: warning: method `retain' not implemented by protocol
NSPasteboard.m:165: warning: method `connectionForProxy' not implemented
by protocol
NSPasteboard.m: In function `+[NSPasteboard _pasteboardWithTarget:name:]':
NSPasteboard.m:247: warning: comparison of distinct pointer types lacks a
cast
NSPasteboard.m:250: warning: method `retain' not implemented by protocol
NSPasteboard.m:262: warning: method `retain' not implemented by protocol
NSSound.m: In function `+[NSSound(PrivateMethods)gsnd]':
NSSound.m:157: warning: method `retain' not implemented by protocol
NSSound.m:159: warning: method `connectionForProxy' not implemented by
protocol
About the remaining warnings,
NSOpenGLContext.m: In function `+[NSOpenGLContext currentContext]':
NSOpenGLContext.m:67: warning: multiple declarations for method
`currentContext'../Headers/AppKit/NSOpenGL.h:95: warning: using
`+(NSOpenGLContext *)currentCont ext'
../Headers/AppKit/NSGraphicsContext.h:163: warning: also found
`+(NSGraphicsCont ext *)currentContext'
I think this is an error in the API. -currentContext should return 'id',
for the same reason that -init returns 'id'.
NSPrintOperation.m: In function `-[NSPrintOperation
_printOperationDidRun:succes s:contextInfo:]':
NSPrintOperation.m:585: warning: passing arg 2 of
`performSelector:withObject:wi thObject:' makes pointer from integer
without a cast
While this is an error in the code. 'success' is a BOOL, and can't be
passed as argument as if it were an object.