Passing argument with different width due to prototype: warning
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