Re: Passing argument with different width due to prototype: warning
Re: Passing argument with different width due to prototype: warning
- Subject: Re: Passing argument with different width due to prototype: warning
- From: Nick Zitzmann <email@hidden>
- Date: Tue, 13 May 2008 19:25:44 -0600
On May 13, 2008, at 7:10 PM, R.L. Grigg wrote:
There is a line of my code that is giving me a warning I cant' douse:
#import <Foundation/Foundation.h>
. . .
NSSocketPort *socketPort=[[NSSocketPort alloc] initWithTCPPort:1234];
. . .
warning: passing argument 1 of 'initWithTCPPort:' with different
width due to prototype
Is this really 1234, or is it something larger? An unsigned short has
to be between 0 and 65535.
If it really is 1234, or at least something <= 65535, then try casting
the constant to unsigned short. Normally integer constants are treated
by the compiler as ints.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden