CB-6212 iOS: fix warnings compiled under arm64 64-bit
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/4bb49849 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/4bb49849 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/4bb49849 Branch: refs/heads/dev Commit: 4bb49849de68900cf3c5371022aa1d71df104394 Parents: d27ee8a Author: James Jong <[email protected]> Authored: Thu Mar 13 09:56:58 2014 -0400 Committer: Archana Naik <[email protected]> Committed: Thu Mar 20 16:28:55 2014 -0700 ---------------------------------------------------------------------- src/ios/CDVNotification.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/4bb49849/src/ios/CDVNotification.m ---------------------------------------------------------------------- diff --git a/src/ios/CDVNotification.m b/src/ios/CDVNotification.m index 58c04f0..ac95cc6 100644 --- a/src/ios/CDVNotification.m +++ b/src/ios/CDVNotification.m @@ -49,7 +49,7 @@ static void soundCompletionCallback(SystemSoundID ssid, void* data); alertView.callbackId = callbackId; - int count = [buttons count]; + NSUInteger count = [buttons count]; for (int n = 0; n < count; n++) { [alertView addButtonWithTitle:[buttons objectAtIndex:n]]; @@ -106,7 +106,7 @@ static void soundCompletionCallback(SystemSoundID ssid, void* data); // Determine what gets returned to JS based on the alert view type. if (alertView.alertViewStyle == UIAlertViewStyleDefault) { // For alert and confirm, return button index as int back to JS. - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:buttonIndex + 1]; + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(int)(buttonIndex + 1)]; } else { // For prompt, return button index and input text back to JS. NSString* value0 = [[alertView textFieldAtIndex:0] text]; @@ -121,13 +121,14 @@ static void soundCompletionCallback(SystemSoundID ssid, void* data); static void playBeep(int count) { SystemSoundID completeSound; + NSInteger cbDataCount = count; NSURL* audioPath = [[NSBundle mainBundle] URLForResource:@"CDVNotification.bundle/beep" withExtension:@"wav"]; #if __has_feature(objc_arc) AudioServicesCreateSystemSoundID((__bridge CFURLRef)audioPath, &completeSound); #else AudioServicesCreateSystemSoundID((CFURLRef)audioPath, &completeSound); #endif - AudioServicesAddSystemSoundCompletion(completeSound, NULL, NULL, soundCompletionCallback, (void*)(count-1)); + AudioServicesAddSystemSoundCompletion(completeSound, NULL, NULL, soundCompletionCallback, (void*)(cbDataCount-1)); AudioServicesPlaySystemSound(completeSound); }
