Re: -Wformat only warns about NSInteger as printf param in 32-bit builds
Re: -Wformat only warns about NSInteger as printf param in 32-bit builds
- Subject: Re: -Wformat only warns about NSInteger as printf param in 32-bit builds
- From: Carl Hoefs <email@hidden>
- Date: Tue, 02 Feb 2016 15:27:03 -0700
On Feb 2, 2016, at 12:45 PM, Jens Alfke <email@hidden> wrote:
error: values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead
Yeah, it's sort of a hopeless situation:
#if __LP64__ || (TARGET_OS_EMBEDDED && !TARGET_OS_IPHONE) || TARGET_OS_WIN32 || NS_BUILD_32_LIKE_64 typedef long NSInteger; typedef unsigned long NSUInteger; #else typedef int NSInteger; typedef unsigned int NSUInteger; #endif
FWIW, I get the same complaint about using UInt32 and SInt32-type variables, for the same reasons.
error: values of type 'UInt32' should not be used as format arguments; add an explicit cast to 'unsigned int' instead error: values of type 'SInt32' should not be used as format arguments; add an explicit cast to 'int' instead
-Carl
|
_______________________________________________
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