Re: CFBridgingRetain and Xcode 7's -Wcast-qual
Re: CFBridgingRetain and Xcode 7's -Wcast-qual
- Subject: Re: CFBridgingRetain and Xcode 7's -Wcast-qual
- From: Sean McBride <email@hidden>
- Date: Mon, 15 Jun 2015 12:15:18 -0400
- Organization: Rogue Research Inc.
On Fri, 12 Jun 2015 20:46:18 +0000, Quincey Morris said:
>> (void*)CFBridgingRetain(self)
>
>That was going to be my suggestion too, because I think it’s C-legal to
>cast away constness, but if that produces some other warning, then Sean
>can simply use the expansion of the CFBridgingRetain macro and leave out
>the ‘const’ keyword. (The macro itself is more or less trivial,
>especially if you’re not concerned with the CFTypeRef part either. It’s
>the documentation effect of using it that has value.)
Ah, I see what you mean, thanks. I'd forgotten CFBridgingRetain was just a cast under ARC. My codebase still supports both GC and ARC so I need to use CFBridgingRetain, but once I ditch GC I can use just __bridge_retained and the warning will indeed go away.
Thanks,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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