cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: CB-5286 - Fix warnings when compiled under arm64
Date Tue, 04 Mar 2014 00:14:51 GMT
Repository: cordova-ios
Updated Branches:
  refs/heads/master 412bd5955 -> 1733e64e7


CB-5286 - Fix warnings when compiled under arm64


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/1733e64e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/1733e64e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/1733e64e

Branch: refs/heads/master
Commit: 1733e64e724007427056e03d0c65e58559de3951
Parents: 412bd59
Author: Shazron Abdullah <shazron@apache.org>
Authored: Mon Mar 3 16:14:43 2014 -0800
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Mon Mar 3 16:14:43 2014 -0800

----------------------------------------------------------------------
 CordovaLib/Classes/CDVConfigParser.m    |  4 ++--
 CordovaLib/Classes/CDVShared.m          |  4 ++--
 CordovaLib/Classes/CDVUserAgentUtil.m   |  6 +++---
 CordovaLib/Classes/CDVViewController.m  |  4 ++--
 CordovaLib/Classes/CDVWebViewDelegate.m | 12 ++++++------
 5 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1733e64e/CordovaLib/Classes/CDVConfigParser.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVConfigParser.m b/CordovaLib/Classes/CDVConfigParser.m
index 7a5685d..4b73b60 100644
--- a/CordovaLib/Classes/CDVConfigParser.m
+++ b/CordovaLib/Classes/CDVConfigParser.m
@@ -62,7 +62,7 @@
             pluginsDict[featureName] = value;
         }
         BOOL paramIsOnload = ([paramName isEqualToString:@"onload"] && [@"true" isEqualToString
: value]);
-        BOOL attribIsOnload = [@"true" isEqualToString : [attributeDict[@"onload"] lowercaseString]];
+        BOOL attribIsOnload = [@"true" isEqualToString :[attributeDict[@"onload"] lowercaseString]];
         if (paramIsOnload || attribIsOnload) {
             [self.startupPluginNames addObject:featureName];
         }
@@ -82,7 +82,7 @@
 
 - (void)parser:(NSXMLParser*)parser parseErrorOccurred:(NSError*)parseError
 {
-    NSAssert(NO, @"config.xml parse error line %d col %d", [parser lineNumber], [parser columnNumber]);
+    NSAssert(NO, @"config.xml parse error line %ld col %ld", (long)[parser lineNumber], (long)[parser
columnNumber]);
 }
 
 @end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1733e64e/CordovaLib/Classes/CDVShared.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVShared.m b/CordovaLib/Classes/CDVShared.m
index 0617ece..ac82234 100644
--- a/CordovaLib/Classes/CDVShared.m
+++ b/CordovaLib/Classes/CDVShared.m
@@ -50,8 +50,8 @@
 - (NSString*)JSONRepresentation
 {
     return [NSString stringWithFormat:
-           @"{ code: %d, message: '%@'}",
-           self.code,
+           @"{ code: %ld, message: '%@'}",
+           (long)self.code,
            [self localizedDescription]
     ];
 }

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1733e64e/CordovaLib/Classes/CDVUserAgentUtil.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVUserAgentUtil.m b/CordovaLib/Classes/CDVUserAgentUtil.m
index 8476e53..c3402d0 100644
--- a/CordovaLib/Classes/CDVUserAgentUtil.m
+++ b/CordovaLib/Classes/CDVUserAgentUtil.m
@@ -91,14 +91,14 @@ static NSMutableArray* gPendingSetUserAgentBlocks = nil;
     if (*lockToken == 0) {
         return;
     }
-    NSAssert(gCurrentLockToken == *lockToken, @"Got token %d, expected %d", *lockToken, gCurrentLockToken);
+    NSAssert(gCurrentLockToken == *lockToken, @"Got token %ld, expected %ld", (long)*lockToken,
(long)gCurrentLockToken);
 
     VerboseLog(@"Released lock %d", *lockToken);
     if ([gPendingSetUserAgentBlocks count] > 0) {
         void (^block)() = [gPendingSetUserAgentBlocks objectAtIndex:0];
         [gPendingSetUserAgentBlocks removeObjectAtIndex:0];
         gCurrentLockToken = ++gNextLockToken;
-        NSLog(@"Gave lock %d", gCurrentLockToken);
+        NSLog(@"Gave lock %ld", (long)gCurrentLockToken);
         block(gCurrentLockToken);
     } else {
         gCurrentLockToken = 0;
@@ -108,7 +108,7 @@ static NSMutableArray* gPendingSetUserAgentBlocks = nil;
 
 + (void)setUserAgent:(NSString*)value lockToken:(NSInteger)lockToken
 {
-    NSAssert(gCurrentLockToken == lockToken, @"Got token %d, expected %d", lockToken, gCurrentLockToken);
+    NSAssert(gCurrentLockToken == lockToken, @"Got token %ld, expected %ld", (long)lockToken,
(long)gCurrentLockToken);
     VerboseLog(@"User-Agent set to: %@", value);
 
     // Setting the UserAgent must occur before a UIWebView is instantiated.

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1733e64e/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index 7bda2cc..3a5cd7d 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -506,8 +506,8 @@
 {
     // First, ask the webview via JS if it supports the new orientation
     NSString* jsCall = [NSString stringWithFormat:
-        @"window.shouldRotateToOrientation && window.shouldRotateToOrientation(%d);"
-        , [self mapIosOrientationToJsOrientation:interfaceOrientation]];
+        @"window.shouldRotateToOrientation && window.shouldRotateToOrientation(%ld);"
+        , (long)[self mapIosOrientationToJsOrientation:interfaceOrientation]];
     NSString* res = [webView stringByEvaluatingJavaScriptFromString:jsCall];
 
     if ([res length] > 0) {

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1733e64e/CordovaLib/Classes/CDVWebViewDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVWebViewDelegate.m b/CordovaLib/Classes/CDVWebViewDelegate.m
index 85ef6be..f882b59 100644
--- a/CordovaLib/Classes/CDVWebViewDelegate.m
+++ b/CordovaLib/Classes/CDVWebViewDelegate.m
@@ -139,13 +139,13 @@ static NSString *stripFragment(NSString* url)
 {
     NSString* loadToken = [webView stringByEvaluatingJavaScriptFromString:@"window.__cordovaLoadToken"];
 
-    return [[NSString stringWithFormat:@"%d", _curLoadToken] isEqualToString:loadToken];
+    return [[NSString stringWithFormat:@"%ld", (long)_curLoadToken] isEqualToString:loadToken];
 }
 
 - (void)setLoadToken:(UIWebView*)webView
 {
     _curLoadToken += 1;
-    [webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"window.__cordovaLoadToken=%d",
_curLoadToken]];
+    [webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"window.__cordovaLoadToken=%ld",
(long)_curLoadToken]];
 }
 
 - (NSString*)evalForCurrentURL:(UIWebView*)webView
@@ -226,7 +226,7 @@ static NSString *stripFragment(NSString* url)
                     // Redirect case.
                     // We expect loadCount == 1.
                     if (_loadCount != 1) {
-                        NSLog(@"CDVWebViewDelegate: Detected redirect when loadCount=%d",
_loadCount);
+                        NSLog(@"CDVWebViewDelegate: Detected redirect when loadCount=%ld",
(long)_loadCount);
                     }
                     break;
 
@@ -242,7 +242,7 @@ static NSString *stripFragment(NSString* url)
                     {
                         _loadCount = 0;
                         _state = STATE_WAITING_FOR_LOAD_START;
-                        NSString* description = [NSString stringWithFormat:@"CDVWebViewDelegate:
Navigation started when state=%d", _state];
+                        NSString* description = [NSString stringWithFormat:@"CDVWebViewDelegate:
Navigation started when state=%ld", (long)_state];
                         NSLog(@"%@", description);
                         if ([_delegate respondsToSelector:@selector(webView:didFailLoadWithError:)])
{
                             NSDictionary* errorDictionary = @{NSLocalizedDescriptionKey :
description};
@@ -290,7 +290,7 @@ static NSString *stripFragment(NSString* url)
 
         case STATE_WAITING_FOR_LOAD_START:
             if (_loadCount != 0) {
-                NSLog(@"CDVWebViewDelegate: Unexpected loadCount in didStart. count=%d",
_loadCount);
+                NSLog(@"CDVWebViewDelegate: Unexpected loadCount in didStart. count=%ld",
(long)_loadCount);
             }
             fireCallback = YES;
             _state = STATE_WAITING_FOR_LOAD_FINISH;
@@ -310,7 +310,7 @@ static NSString *stripFragment(NSString* url)
             break;
 
         default:
-            NSLog(@"CDVWebViewDelegate: Unexpected didStart with state=%d loadCount=%d",
_state, _loadCount);
+            NSLog(@"CDVWebViewDelegate: Unexpected didStart with state=%ld loadCount=%ld",
(long)_state, (long)_loadCount);
     }
     VerboseLog(@"webView didStartLoad (after). state=%d loadCount=%d fireCallback=%d", _state,
_loadCount, fireCallback);
     if (fireCallback && [_delegate respondsToSelector:@selector(webViewDidStartLoad:)])
{


Mime
View raw message