Re: Turning off 'enumeral mismatch' warnings?
Re: Turning off 'enumeral mismatch' warnings?
- Subject: Re: Turning off 'enumeral mismatch' warnings?
- From: Steve Sisak <email@hidden>
- Date: Thu, 11 May 2006 21:23:40 -0400
At 6:15 PM -0700 5/11/06, Chris Espinosa wrote:
On May 11, 2006, at 5:47 PM, James W. Walker wrote:
Matt Gough <<mailto:email@hidden>email@hidden> wrote:
However, anytime I do the 'err = someParam ? noErr : paramErr'
portion I get one of the following warnings:
warning: enumeral mismatch in conditional expression: '<anonymous
enum>' vs '<anonymous enum>'
This is known as <<rdar://problem/2869460>rdar://problem/2869460>
anonymous enum clashes in conditionals and there is currently no
workaround.
This was driving me nuts too.
A workaround for this specific case is:
err = someParam ? (OSErr) noErr : paramErr;
By casting either param to an integer type, the other is promoted and
the types now match (and you probably wanted OSErr or OSStatus
anyway).
HTH,
-Steve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden