• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Passing argument with different width due to prototype: warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Passing argument with different width due to prototype: warning (From: "R.L. Grigg" <email@hidden>)

  • Prev by Date: Passing argument with different width due to prototype: warning
  • Next by Date: Re: Passing argument with different width due to prototype: warning
  • Previous by thread: Passing argument with different width due to prototype: warning
  • Next by thread: Re: Passing argument with different width due to prototype: warning
  • Index(es):
    • Date
    • Thread