• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CFBridgingRetain and Xcode 7's -Wcast-qual
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: CFBridgingRetain and Xcode 7's -Wcast-qual
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Is the f***ing NDA back, or why is no one talking about new stuff?
  • Next by Date: import autocomplete not working since upgrade to 6.3
  • Previous by thread: Re: Is the NDA back, or why is no one talking about new stuff?
  • Next by thread: Re: CFBridgingRetain and Xcode 7's -Wcast-qual
  • Index(es):
    • Date
    • Thread