Re: warning for unsigned parameter, signed argument with NSUInteger

2009-04-15 Thread Greg Parker
On Apr 15, 2009, at 1:59 PM, Sean McBride wrote: On 4/15/09 1:53 PM, Greg Parker said: -Wconversion will warn about this ("Also, warn if a negative integer constant expression is implicitly converted to an unsigned type.") But -Wconversion generates other undesirable and unavoidable warnings,

Re: warning for unsigned parameter, signed argument with NSUInteger

2009-04-15 Thread Sean McBride
On 4/15/09 1:53 PM, Greg Parker said: >> I have way more warnings than that enabled and I don't get a warning >> either. I don't think there is one. File a bug. > >-Wconversion will warn about this ("Also, warn if a negative integer >constant expression is implicitly converted to an unsigned typ

Re: warning for unsigned parameter, signed argument with NSUInteger

2009-04-15 Thread Greg Parker
On Apr 15, 2009, at 1:47 PM, Sean McBride wrote: On 4/14/09 10:03 PM, Roland King said: I have this definition using NSUInteger -(id)initWithXExtent:(NSUInteger)xExtent yExtent:(NSUInteger) yExtent; and I was stupidly calling it like this GameBoard *gb = [ [ GameBoard alloc ] initWithX

Re: warning for unsigned parameter, signed argument with NSUInteger

2009-04-15 Thread Sean McBride
On 4/14/09 10:03 PM, Roland King said: >I have this definition using NSUInteger > > -(id)initWithXExtent:(NSUInteger)xExtent yExtent:(NSUInteger)yExtent; > >and I was stupidly calling it like this > > GameBoard *gb = [ [ GameBoard alloc ] initWithXExtent:5 yExtent:-10 ]; > >and I didn'

Re: warning for unsigned parameter, signed argument with NSUInteger

2009-04-14 Thread Jesper Storm Bache
From NSObjCRuntime.h (10.5SDK) #if __LP64__ || NS_BUILD_32_LIKE_64 typedef long NSInteger; typedef unsigned long NSUInteger; #else typedef int NSInteger; typedef unsigned int NSUInteger; #endif It appears that the documentation is incorrect (the comment is correct: "... A 64-bit application tr

Re: warning for unsigned parameter, signed argument with NSUInteger

2009-04-14 Thread Drew Lawson
[again, sending to list] According to Roland King: > but not this. NSUInteger is just a typedef isn't it, so this is really > unsigned int / int and I was expecting a warning. Have I missed a > warning flag or is there some NSUInteger artifact I'm not aware of? I've been puzzled by this, but

warning for unsigned parameter, signed argument with NSUInteger

2009-04-14 Thread Roland King
I have this definition using NSUInteger -(id)initWithXExtent:(NSUInteger)xExtent yExtent:(NSUInteger)yExtent; and I was stupidly calling it like this GameBoard *gb = [ [ GameBoard alloc ] initWithXExtent:5 yExtent:-10 ]; and I didn't get a warning and spent 5 minutes trying to