aboutsummaryrefslogtreecommitdiff
path: root/iPhone
diff options
context:
space:
mode:
authorGravatar Mark Mentovai <mark@chromium.org>2017-07-23 21:05:55 -0400
committerGravatar Sergio Campamá <kaipi@google.com>2017-07-24 10:57:24 -0500
commit3c3111d3aefe907c8c0f0e933029608d96ceefeb (patch)
treea4322828d03be2d05a407dedf36bce485e9e450a /iPhone
parentec72a2bc500a716369c383837bffdc7d2a22855b (diff)
Cast NSInteger to long for formatting as %ld
In https://crbug.com/747643, a new version of Clang produces warnings when attempting to format NSInteger as %zd (which is normally used for ssize_t). Acquiesce by casting NSInteger to long and formatting using %ld. In the process, I audited all occurrences of %zd in GTM and found that the remainder were being used to format size_t, which ought to use %zu, so I’ve corrected those. I also audited the existing uses of %zu and found them all to be correct.
Diffstat (limited to 'iPhone')
-rw-r--r--iPhone/GTMUIImage+Resize.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/iPhone/GTMUIImage+Resize.m b/iPhone/GTMUIImage+Resize.m
index 0965c3e..680e413 100644
--- a/iPhone/GTMUIImage+Resize.m
+++ b/iPhone/GTMUIImage+Resize.m
@@ -152,7 +152,7 @@ GTM_INLINE CGSize swapWidthAndHeight(CGSize size) {
break;
default:
- _GTMDevAssert(false, @"Invalid orientation %zd", orientation);
+ _GTMDevAssert(false, @"Invalid orientation %ld", (long)orientation);
return nil;
}