• 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
Passing argument with different width due to prototype: warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Passing argument with different width due to prototype: warning


  • Subject: Passing argument with different width due to prototype: warning
  • From: "R.L. Grigg" <email@hidden>
  • Date: Tue, 13 May 2008 18:10:04 -0700

Im using Xcode 3.0 and building a Foundation Tool (debug, PPC). The base SDK path is $(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk and Ive included Foundation.framework in the project under "External Frameworks and Libraries".

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


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? Below is the full text output of the compile.

Russ


CompileC build/NetHub.build/Debug/NetHub.build/Objects-normal/ppc/ NetHub.o /Users/russ/projects/NetHub/NetHub.m normal ppc objective-c com.apple.compilers.gcc.4_0
cd /Users/russ/projects/NetHub
/Developer/usr/bin/gcc-4.0 -x objective-c -arch ppc -pipe -Wno- trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wswitch - Wunused-variable -Wshadow -Wsign-compare -Wconversion -fmessage- length=0 -mtune=G5 -mfix-and-continue -mmacosx-version-min=10.5 - gdwarf-2 -I/Users/russ/projects/NetHub/build/NetHub.build/Debug/ NetHub.build/NetHub.hmap -F/Users/russ/projects/NetHub/build/Debug -I/ Users/russ/projects/NetHub/build/Debug/include -I/Users/russ/projects/ NetHub/build/NetHub.build/Debug/NetHub.build/DerivedSources -isysroot / Developer/SDKs/MacOSX10.5.sdk -include /Library/Caches/com.apple.Xcode. 502/SharedPrecompiledHeaders/NetHub_Prefix- cqkgtiwyvaysckdocenjyhyqyejn/NetHub_Prefix.pch -c /Users/russ/projects/ NetHub/NetHub.m -o /Users/russ/projects/NetHub/build/NetHub.build/ Debug/NetHub.build/Objects-normal/ppc/NetHub.o
/Users/russ/projects/NetHub/NetHub.m: In function 'main':
/Users/russ/projects/NetHub/NetHub.m:127: warning: passing argument 1 of 'initWithTCPPort:' with different width due to prototype


_______________________________________________

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


  • Follow-Ups:
    • Re: Passing argument with different width due to prototype: warning
      • From: Christopher Nebel <email@hidden>
    • Re: Passing argument with different width due to prototype: warning
      • From: Jack Repenning <email@hidden>
    • Re: Passing argument with different width due to prototype: warning
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Xcode eats 100% CPU and more while typing
  • Next by Date: Re: Passing argument with different width due to prototype: warning
  • Previous by thread: Re: Xcode eats 100% CPU and more while typing
  • Next by thread: Re: Passing argument with different width due to prototype: warning
  • Index(es):
    • Date
    • Thread