From eb8184a334e3f9784e5b5dd108fefbcf2f57595a Mon Sep 17 00:00:00 2001 From: Joseph Heenan Date: Thu, 2 Oct 2014 22:41:39 +0200 Subject: iOS: tweak types to avoid warnings in 64 bit builds Still more warnings left. --- platform/ios/Classes/MuChoiceFieldController.m | 2 +- platform/ios/Classes/MuDocumentController.m | 3 ++- platform/ios/Classes/MuLibraryController.m | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'platform/ios/Classes') diff --git a/platform/ios/Classes/MuChoiceFieldController.m b/platform/ios/Classes/MuChoiceFieldController.m index dce17e03..7b165350 100644 --- a/platform/ios/Classes/MuChoiceFieldController.m +++ b/platform/ios/Classes/MuChoiceFieldController.m @@ -10,7 +10,7 @@ { void (^okayBlock)(NSArray *); NSArray *choices; - int selected; + NSInteger selected; } - (id)initWithChoices:(NSArray *)_choices okayAction:(void (^)(NSArray *))block diff --git a/platform/ios/Classes/MuDocumentController.m b/platform/ios/Classes/MuDocumentController.m index 0fdf8d98..3c0391a8 100644 --- a/platform/ios/Classes/MuDocumentController.m +++ b/platform/ios/Classes/MuDocumentController.m @@ -88,7 +88,8 @@ static void saveDoc(char *current_path, fz_document *doc) FILE *fin = fopen(current_path, "rb"); FILE *fout = fopen(tmp, "wb"); char buf[256]; - int n, err = 1; + size_t n; + int err = 1; if (fin && fout) { diff --git a/platform/ios/Classes/MuLibraryController.m b/platform/ios/Classes/MuLibraryController.m index 2e3c5d2e..529253e2 100644 --- a/platform/ios/Classes/MuLibraryController.m +++ b/platform/ios/Classes/MuLibraryController.m @@ -95,7 +95,7 @@ static void showAlert(NSString *msg, NSString *filename) if (buttonIndex == [actionSheet destructiveButtonIndex]) { char filename[PATH_MAX]; - int row = [actionSheet tag]; + NSInteger row = [actionSheet tag]; dispatch_sync(queue, ^{}); @@ -113,7 +113,7 @@ static void showAlert(NSString *msg, NSString *filename) - (void) onTapDelete: (UIControl*)sender { - int row = [sender tag]; + NSInteger row = [sender tag]; NSString *title = [NSString stringWithFormat: @"Delete %@?", [files objectAtIndex:row]]; UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle: title @@ -132,7 +132,7 @@ static void showAlert(NSString *msg, NSString *filename) UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: cellid]; if (!cell) cell = [[[UITableViewCell alloc] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: cellid] autorelease]; - int row = [indexPath row]; + NSInteger row = [indexPath row]; [[cell textLabel] setText: [files objectAtIndex: row]]; [[cell textLabel] setFont: [UIFont systemFontOfSize: 20]]; @@ -148,7 +148,7 @@ static void showAlert(NSString *msg, NSString *filename) - (void) tableView: (UITableView*)tableView didSelectRowAtIndexPath: (NSIndexPath*)indexPath { - int row = [indexPath row]; + NSInteger row = [indexPath row]; [self openDocument: [files objectAtIndex: row]]; } -- cgit v1.2.3