Re: Mysterious warning (initialization from distinct Objective-C type)
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