summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Heenan <joseph@emobix.co.uk>2014-10-02 22:41:39 +0200
committerJoseph Heenan <joseph@emobix.co.uk>2014-10-05 09:38:12 -0500
commiteb8184a334e3f9784e5b5dd108fefbcf2f57595a (patch)
treec446a78e077b9fbb202eb10dc2e3828ad9281dc0
parente481ca09f57c33b7010660c464282d25432a106b (diff)
iOS: tweak types to avoid warnings in 64 bit builds
Still more warnings left.
-rw-r--r--platform/ios/Classes/MuChoiceFieldController.m2
-rw-r--r--platform/ios/Classes/MuDocumentController.m3
-rw-r--r--platform/ios/Classes/MuLibraryController.m8
3 files changed, 7 insertions, 6 deletions
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]];
}