CFBridgingRetain and Xcode 7's -Wcast-qual
CFBridgingRetain and Xcode 7's -Wcast-qual
- Subject: CFBridgingRetain and Xcode 7's -Wcast-qual
- From: Sean McBride <email@hidden>
- Date: Fri, 12 Jun 2015 15:30:01 -0400
- Organization: Rogue Research Inc.
Hi all,
clang's -Wcast-qual in Xcode 7 beta now warns in more cases than before. I've been able to fix most, but sometimes one needs to pass an Obj-C object as the 'context' or 'refCon' to some C API. ex:
IOServiceAddMatchingNotification(
...,
CFBridgingRetain(self),
...);
But now it warns: "Cast from 'const void *' to 'void *' drops const qualifier" because IOServiceAddMatchingNotification wants a void* but CFBridgingRetain returns a const void*.
Any clever solutions here?
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