Re: "discards qualifiers from pointer target type"?
Re: "discards qualifiers from pointer target type"?
- Subject: Re: "discards qualifiers from pointer target type"?
- From: Cameron Hayne <email@hidden>
- Date: Wed, 3 Jul 2002 03:08:31 -0400
On Wednesday, July 3, 2002, at 02:50 am, Ian Crew wrote:
MSM src/AppDelegate.m:1468: warning: passing arg 2 of
`DotDecimalToInetHost::' discards qualifiers from pointer target type
DotDecimalToInetHost is defined as:
- (int) DotDecimalToInetHost:(int* )ipAddr :(char*) dotDecimal;
and the line that gnerates the warning reads:
err = [self DotDecimalToInetHost: &ipAddrBits :[TheIP cString]];
ipAddrBits is an int, and TheIP is a NSString*.
This has come up before (so you might have found out the answer by
searching at Cocoa.mamasam.com).
The NSString cString method returns a const char*
It is the const that the compiler is complaining about.
... Cameron
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.