cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [1/7] ios commit: Fix build warnings
Date Tue, 22 Jul 2014 05:27:16 GMT
Repository: cordova-ios
Updated Branches:
  refs/heads/wkwebview 3d39ef4e3 -> 1e84e301b


Fix build warnings

* CordovaLib/Classes/CDVURLProtocol.m:169:46: Implicit conversion loses integer precision:
'long long' to 'unsigned long'
* CordovaLib/Classes/CDVURLProtocol.m:170:100: Implicit conversion loses integer precision:
'long long' to 'NSUInteger' (aka 'unsigned int')

close #99


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

Branch: refs/heads/wkwebview
Commit: 0bf656c3bccbe85813964bcf13c6705e0da37192
Parents: 40b9ddf
Author: 利辺羅エルネスト <rivera_ernesto@cyberagent.co.jp>
Authored: Thu Jul 10 11:44:04 2014 +0900
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Mon Jul 14 15:20:10 2014 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/CDVURLProtocol.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/0bf656c3/CordovaLib/Classes/CDVURLProtocol.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVURLProtocol.m b/CordovaLib/Classes/CDVURLProtocol.m
index feb7c99..3ecb6a0 100644
--- a/CordovaLib/Classes/CDVURLProtocol.m
+++ b/CordovaLib/Classes/CDVURLProtocol.m
@@ -168,8 +168,8 @@ static CDVViewController *viewControllerForRequest(NSURLRequest* request)
                 // We have the asset!  Get the data and send it along.
                 ALAssetRepresentation* assetRepresentation = [asset defaultRepresentation];
                 NSString* MIMEType = (__bridge_transfer NSString*)UTTypeCopyPreferredTagWithClass((__bridge
CFStringRef)[assetRepresentation UTI], kUTTagClassMIMEType);
-                Byte* buffer = (Byte*)malloc([assetRepresentation size]);
-                NSUInteger bufferSize = [assetRepresentation getBytes:buffer fromOffset:0.0
length:[assetRepresentation size] error:nil];
+                Byte* buffer = (Byte*)malloc((unsigned long)[assetRepresentation size]);
+                NSUInteger bufferSize = [assetRepresentation getBytes:buffer fromOffset:0.0
length:(NSUInteger)[assetRepresentation size] error:nil];
                 NSData* data = [NSData dataWithBytesNoCopy:buffer length:bufferSize freeWhenDone:YES];
                 [self sendResponseWithResponseCode:200 data:data mimeType:MIMEType];
             } else {


Mime
View raw message