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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to