• 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
Re: 4.5 and NSInteger/NSUInteger Format Specifier Warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 4.5 and NSInteger/NSUInteger Format Specifier Warnings


  • Subject: Re: 4.5 and NSInteger/NSUInteger Format Specifier Warnings
  • From: Nick Zitzmann <email@hidden>
  • Date: Wed, 03 Oct 2012 17:01:18 -0600

On Oct 3, 2012, at 12:53 PM, Keary Suska <email@hidden> wrote:

> On Oct 3, 2012, at 12:04 PM, Thomas Clement wrote:
>
>> If you're compiling for both 32 and 64-bit you should use %lu and cast to 'unsigned long'.
>
> Thanks for that--I just figured it out a minute ago. I had changed my architecture setting to 32/64--changing it back to 32 solved the issue for now. So it seems that when trying to compile a fat binary you have to cast. What a pain.

Or just add NS_BUILD_32_LIKE_64 to the preprocessor macros, which will turn NS(U)Integers into longs instead of ints when building for 32-bit, which solves the problem in a less painful way. As long as you're not using any C++ code in your project, this won't cause any problems.

Nick Zitzmann
<http://www.chronosnet.com/>


 _______________________________________________
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: 4.5 and NSInteger/NSUInteger Format Specifier Warnings
      • From: Jean-Denis MUYS <email@hidden>
References: 
 >4.5 and NSInteger/NSUInteger Format Specifier Warnings (From: Keary Suska <email@hidden>)
 >Re: 4.5 and NSInteger/NSUInteger Format Specifier Warnings (From: Thomas Clement <email@hidden>)
 >Re: 4.5 and NSInteger/NSUInteger Format Specifier Warnings (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: 4.5 and NSInteger/NSUInteger Format Specifier Warnings
  • Next by Date: linker assertion failure
  • Previous by thread: Re: 4.5 and NSInteger/NSUInteger Format Specifier Warnings
  • Next by thread: Re: 4.5 and NSInteger/NSUInteger Format Specifier Warnings
  • Index(es):
    • Date
    • Thread