Re: printing NSUInteger in iOS
Re: printing NSUInteger in iOS
- Subject: Re: printing NSUInteger in iOS
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Mon, 18 Nov 2013 05:06:38 +0700
On 18 Nov 2013, at 03:38, Andy Lee <email@hidden> wrote:
> I've been grudgingly casting, but there is this, which I haven't yet memorized:
>
> <https://twitter.com/gparker/status/377910611453046784>
>> %zd, %tu, %tx (signed, unsigned, hex) currently format NSInteger and NSUInteger with no warnings.
>
> --Andy
Excellent. Though "currently" sounds like: "might stop to work any minute".
Also: why does Xcode work differently with iOS versus OS X? Xcode bug?
But thanks a lot. This is much better than casting!
Kind regards,
Gerriet.
>
> On Nov 17, 2013, at 3:34 PM, Gerriet M. Denkmann <email@hidden> wrote:
>
>> Xcode 5.0.2 compiles this for OS X without warnings ( NS_BUILD_32_LIKE_64=1):
>>
>> NSUInteger abc = 23;
>> NSLog(@"%s abc %lu",__FUNCTION__, abc);
>>
>> But in an iOS app it tells me "Values of type 'NSUInteger' should not be used as format arguments; add an explicit cast to 'unsigned long' instead".
>>
>> How to get rid of this warning (which makes no sense for NS_BUILD_32_LIKE_64=1)?
>> (Without casting each NSUInteger to 'unsigned long')
_______________________________________________
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