Re: printing NSUInteger in iOS
Re: printing NSUInteger in iOS
- Subject: Re: printing NSUInteger in iOS
- From: Andy Lee <email@hidden>
- Date: Sun, 17 Nov 2013 15:38:22 -0500
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
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')
>
> Gerriet.
> _______________________________________________
> 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
_______________________________________________
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