• 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: Mysterious warning (initialization from distinct Objective-C type)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mysterious warning (initialization from distinct Objective-C type)


  • Subject: Re: Mysterious warning (initialization from distinct Objective-C type)
  • From: Cameron Hayne <email@hidden>
  • Date: Wed, 21 Sep 2005 07:33:31 -0400

On 21-Sep-05, at 1:35 AM, Mason Mark wrote:
warning: initialization from distinct Objective-C type

FSColoredView *v = [self mainView]; // returns an id: -(id) mainView;
The line of code above generates the warning. I am not building a universal binary.
I started getting this warning after upgrading to GCC 4.0.1.

I'm guessing that this is a new warning that is intended to warn you about what the Obj-C document <http://developer.apple.com/ documentation/Cocoa/Conceptual/ObjectiveC/LanguageOverview/ chapter_3_section_8.html> says is "error-prone, but is allowed nonetheless" - assigning an 'id' to a statically typed variable.


--
Cameron Hayne
email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Mysterious warning (initialization from distinct Objective-C type)
      • From: Mason Mark <email@hidden>
References: 
 >Mysterious warning: (From: Dan Wood <email@hidden>)
 >Re: Mysterious warning (initialization from distinct Objective-C type) (From: Mason Mark <email@hidden>)

  • Prev by Date: NSRoundRectBezelStyle still doesn't work with NSPopUpButton?
  • Next by Date: Re: Mysterious warning (initialization from distinct Objective-C type)
  • Previous by thread: Re: Mysterious warning (initialization from distinct Objective-C type)
  • Next by thread: Re: Mysterious warning (initialization from distinct Objective-C type)
  • Index(es):
    • Date
    • Thread