You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.
Xcode 9.3 is not happy when you use %zd and %tu as a specifier for NSInteger and NSUInteger variables. They will generate warnings either when compiling on an iPhone 5c, or when compiling on an iPhone 5s+ (compile to Generic iOS device to test it):
Enum values with underlying type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead
This sucks if you have a project treating warnings as errors.
I suggest changing the implementation to the recommended Xcode fix-it solution: explicitly cast to (long) or (unsigned long) and use the %ld/%lu specifiers.
The text was updated successfully, but these errors were encountered:
rsanchezsaez
changed the title
Cast to %ld/%ud instead of issuing %zd/%tu specifiers for NSInteger/NSUInteger variables
Cast to %ld and %ud instead of issuing %zd and %tu specifiers for NSInteger and NSUInteger variables
Mar 30, 2018
rsanchezsaez
changed the title
Cast to %ld and %ud instead of issuing %zd and %tu specifiers for NSInteger and NSUInteger variables
Cast to %ld and %lu instead of issuing %zd and %tu specifiers for NSInteger and NSUInteger variables
Apr 3, 2018
Xcode 9.3 is not happy when you use
%zd
and%tu
as a specifier forNSInteger
andNSUInteger
variables. They will generate warnings either when compiling on an iPhone 5c, or when compiling on an iPhone 5s+ (compile to Generic iOS device to test it):This sucks if you have a project treating warnings as errors.
I suggest changing the implementation to the recommended Xcode fix-it solution: explicitly cast to
(long)
or(unsigned long)
and use the%ld
/%lu
specifiers.The text was updated successfully, but these errors were encountered: