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: Roland King <email@hidden>
- Date: Sat, 13 Jun 2015 08:52:59 +0800
Can you just use __bridge_retained instead of the CFBridgingRetain macro?
> On 13 Jun 2015, at 06:35, Sean McBride <email@hidden> wrote:
>
> 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.)
>
> I think I'll just wrap my use of IOServiceAddMatchingNotification() and disable the warning there.
>
> I wonder if Apple would consider changing IOServiceAddMatchingNotification() to take const... they did change a bunch of vDSP API recently to be more const-friendly, so maybe...
>
> Cheers,
_______________________________________________
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