From 3c3111d3aefe907c8c0f0e933029608d96ceefeb Mon Sep 17 00:00:00 2001 From: Mark Mentovai Date: Sun, 23 Jul 2017 21:05:55 -0400 Subject: Cast NSInteger to long for formatting as %ld MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- iPhone/GTMUIImage+Resize.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iPhone') 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; } -- cgit v1.2.3