• 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: "discards qualifiers from pointer target type"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: "discards qualifiers from pointer target type"?
  • Next by Date: Re: (no subject)
  • Previous by thread: "discards qualifiers from pointer target type"?
  • Next by thread: NSEnumerator ordering ?
  • Index(es):
    • Date
    • Thread