• 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: Chris Hanson <email@hidden>
  • Date: Fri, 05 Oct 2012 10:34:32 -0700

On Oct 5, 2012, at 1:04 AM, Gerriet M. Denkmann <email@hidden> wrote:

> On 4 Oct 2012, at 12:31, Chris Hanson <email@hidden> wrote:
>
>> On Oct 3, 2012, at 5:24 PM, Gerriet M. Denkmann <email@hidden> wrote:
>>
>>> With this line in Xcode Build Settings:
>>> OTHER_CFLAGS = -DNS_BUILD_32_LIKE_64=1
>>> NS(U)Integer is (unsigned) long for both 32 and 64 Bits.
>>> So that %lu / %ld works for both without warnings without any castings.
>>
>> You should use the Preprocessor Macros build setting instead of Other C Flags for things like this.
>
> Why? Does the Preprocessor need to know whether NSInteger is int or long (in a 32 bit build)?

You should use the Preprocessor Macros build setting because this is a preprocessor macro. (Passing -Dfoo=bar to the compiler sets the preprocessor macro "foo" to the value "bar".)

>> And include $(inherited) as well unless you explicitly want to exclude values from the setting at other levels.
>
> Currently I have:
> GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited)
>
> Should this become:
> GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited) NS_BUILD_32_LIKE_64=1  $(inherited)
>
> or just:
> GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1  NS_BUILD_32_LIKE_64=1  $(inherited)

The latter.

  -- Chris

 _______________________________________________
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

References: 
 >Re: 4.5 and NSInteger/NSUInteger Format Specifier Warnings (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: 4.5 and NSInteger/NSUInteger Format Specifier Warnings (From: Chris Hanson <email@hidden>)
 >Re: 4.5 and NSInteger/NSUInteger Format Specifier Warnings (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: 4.5 and NSInteger/NSUInteger Format Specifier Warnings
  • Next by Date: The falcon cannot hear the falconer
  • Previous by thread: Re: 4.5 and NSInteger/NSUInteger Format Specifier Warnings
  • Next by thread: Re: git rebase corrupts Xcode projects
  • Index(es):
    • Date
    • Thread