Re: Compiler warnings building GNUstep gui

2010-04-07 Thread Jens Ayton
On Apr 6, 2010, at 13:03, David Chisnall wrote:
> On 6 Apr 2010, at 09:24, Fred Kiefer wrote:
>> 
>> NSRulerMarker.m:189: warning: ‘-retain’ not found in protocol(s)
> 
> I see this a lot in code ported from OS X.  I'm not sure exactly why it's an 
> error for us and not on OS X, but all of the Cocoa protocols are treated as 
> conforming to the NSObject protocol (I've not checked if they explicitly do, 
> or if the compiler just pretends that they do).

It's explicit.

-- 
Jens Ayton



___
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev


Re: Compiler warnings building GNUstep gui

2010-04-06 Thread David Chisnall
On 6 Apr 2010, at 09:24, Fred Kiefer wrote:

> NSRulerMarker.m:189: warning: ‘-retain’ not found in protocol(s)

I see this a lot in code ported from OS X.  I'm not sure exactly why it's an 
error for us and not on OS X, but all of the Cocoa protocols are treated as 
conforming to the NSObject protocol (I've not checked if they explicitly do, or 
if the compiler just pretends that they do).

David

-- Sent from my Difference Engine





___
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev


Compiler warnings building GNUstep gui

2010-04-06 Thread Fred Kiefer
I am currently trying to reduce the amount of compiler warnings
generated by GNUstep gui. At the moment I have these left with a gcc
4.4.1 on a 64 bit system:

NSDocumentController.m:105: warning: ‘TypeInfoForHumanReadableName’
defined but not used
NSGraphicsContext.m: In function ‘-[NSGraphicsContext setFocusStack:]’:
NSGraphicsContext.m:379: warning: invalid receiver type ‘void *’
NSRulerMarker.m: In function ‘-[NSRulerMarker setRepresentedObject:]’:
NSRulerMarker.m:189: warning: ‘-retain’ not found in protocol(s)
NSSpellChecker.m: In function ‘-[NSSpellChecker _switchDictionary:]’:
NSSpellChecker.m:653: warning: ‘-retain’ not found in protocol(s)
NSSplitView.m: In function ‘-[NSSplitView mouseDown:]’:
NSSplitView.m:404: warning: ‘op.y’ may be used uninitialized in this
function
NSSplitView.m:404: warning: ‘op.x’ may be used uninitialized in this
function
IMLoading.m:215: warning: ‘__dummyFunctionForLinking’ defined but not used

All of these are definitely harmless and more a compiler issue than
problematic code. Still it would be nice to get rid of them in a clean
way. (That is without hiding potential problems in the future)

If you are getting other problems reported on different machines or with
an older (or newer?) compiler, I would like to take care of these too.

Fred


___
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev