From 7201bc348cb3214278d1c1b0943bf6354750e213 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Sun, 12 Apr 2015 06:01:16 +0300 Subject: [PATCH] [ios] Fixed some 64-bit issues. TODO: Carefully fix all warnings due to precision lost for arm64. --- iphone/Common/DiskFreeSpace.h | 2 +- iphone/Maps/Classes/BottomMenu.mm | 2 +- iphone/Maps/Classes/MapCell.mm | 2 +- iphone/Maps/Platform/LocationManager.mm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iphone/Common/DiskFreeSpace.h b/iphone/Common/DiskFreeSpace.h index b905aec4d0..70bd74d72f 100644 --- a/iphone/Common/DiskFreeSpace.h +++ b/iphone/Common/DiskFreeSpace.h @@ -13,7 +13,7 @@ uint64_t FreeDiskSpaceInBytes() } else { - NSLog(@"Error Obtaining Free File System Info: Domain = %@, Code = %d", [error domain], [error code]); + NSLog(@"Error Obtaining Free File System Info: Domain = %@, Code = %ld", [error domain], (long)[error code]); return 0; } } diff --git a/iphone/Maps/Classes/BottomMenu.mm b/iphone/Maps/Classes/BottomMenu.mm index 4d5db04fb8..c891c519b0 100644 --- a/iphone/Maps/Classes/BottomMenu.mm +++ b/iphone/Maps/Classes/BottomMenu.mm @@ -139,7 +139,7 @@ self.imageDownloaders[itemId] = downloader; NSDictionary * links = item[@"IconURLs"]; - NSString * key = [NSString stringWithFormat:@"%ix", (NSInteger)[UIScreen mainScreen].scale]; + NSString * key = [NSString stringWithFormat:@"%lix", (long)[UIScreen mainScreen].scale]; NSString * link = links[key]; [downloader startDownloadingWithURL:[NSURL URLWithString:link]]; } diff --git a/iphone/Maps/Classes/MapCell.mm b/iphone/Maps/Classes/MapCell.mm index 0504cf7a20..1967a93124 100644 --- a/iphone/Maps/Classes/MapCell.mm +++ b/iphone/Maps/Classes/MapCell.mm @@ -101,7 +101,7 @@ - (void)setDownloadProgress:(double)downloadProgress animated:(BOOL)animated { self.downloadProgress = downloadProgress; - self.statusLabel.text = [NSString stringWithFormat:@"%i%%", NSInteger(downloadProgress * 100)]; + self.statusLabel.text = [NSString stringWithFormat:@"%li%%", long(downloadProgress * 100)]; [self.progressView setProgress:downloadProgress animated:animated]; if (!self.progressMode) [self setProgressMode:YES withAnimatedLayout:animated]; diff --git a/iphone/Maps/Platform/LocationManager.mm b/iphone/Maps/Platform/LocationManager.mm index 086111a033..b2b1eed77e 100644 --- a/iphone/Maps/Platform/LocationManager.mm +++ b/iphone/Maps/Platform/LocationManager.mm @@ -194,7 +194,7 @@ - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error { - NSLog(@"locationManager failed with error: %d, %@", error.code, error.description); + NSLog(@"locationManager failed with error: %ld, %@", (long)error.code, error.description); if (error.code == kCLErrorDenied) { for (id observer in m_observers)