• 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
How to get rid of "warning: cast to pointer from integer of different size"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to get rid of "warning: cast to pointer from integer of different size"


  • Subject: How to get rid of "warning: cast to pointer from integer of different size"
  • From: "Marc Rouen Meguillo" <email@hidden>
  • Date: Thu, 13 Nov 2008 14:40:05 +0800

Given the following code:

CFStringRef myString= (CFStringRef) SCDynamicStoreKeyCreateNetworkInterface( kCFAllocatorDefault, kSCDynamicStoreDomainState);

I will get the "warning: cast to pointer from integer of different size" during build.
Actually the SCDynamicStoreKeyCreateNetworkInterface function already returns a CFStringRef according to Apple Documentation.
However if I remove the type cast to CFStringRef, im getting the "warning: initialization makes pointer from integer without a cast".
How do I get rid of these warnings?
 
Im using XCode 3.1 and GCC 4.0 running on Leopard 10.5.5.
 _______________________________________________
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: How to get rid of "warning: cast to pointer from integer of different size"
      • From: Rick Altherr <email@hidden>
  • Prev by Date: Re: XCode 3 auto-indent
  • Next by Date: Re: How to get rid of "warning: cast to pointer from integer of different size"
  • Previous by thread: Re: non_lazy_ptr in general
  • Next by thread: Re: How to get rid of "warning: cast to pointer from integer of different size"
  • Index(es):
    • Date
    • Thread