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: "R.L. Grigg" <email@hidden>
- Date: Tue, 13 May 2008 18:35:55 -0700
On May 13, 2008, at 6:27 PM, Jack Repenning wrote:
On May 13, 2008, at 6:10 PM, R.L. Grigg wrote:
NSSocketPort *socketPort=[[NSSocketPort alloc] initWithTCPPort:1234];
. . .
warning: passing argument 1 of 'initWithTCPPort:' with different
width due to prototype
I checked the NSPort header file for the NSSocketPort method
prototype, /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/
Foundation.framework/Versions/C/Headers/NSPort.h:
- (id)initWithTCPPort:(unsigned short)port;
What am I doing wrong?
Have you tried this?
NSSocketPort *socketPort=[[NSSocketPort alloc] initWithTCPPort:
(unsigned short)1234];
Jack, Nick,
Yes, I've tried both casting and hard-coding the port number. Even a
port number of 1 hard coded gives the error and casting makes no
difference (unsigned short, short, int, long, etc). Its almost like
its looking at some other prototype someplace but I cant figure out
what or why. I'm not building 64 bit. This is on OSX 10.5.2. Do you
think this is a Xcode issue?
Thx,
Russ
_______________________________________________
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