You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2018/04/03 09:30:05 UTC
incubator-weex git commit: * [iOS] fix compiler warning
Repository: incubator-weex
Updated Branches:
refs/heads/master 63c06197f -> d541c4836
* [iOS] fix compiler warning
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d541c483
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d541c483
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d541c483
Branch: refs/heads/master
Commit: d541c48361d011a6342834bbcdbdcb26a798a3c6
Parents: 63c0619
Author: acton393 <zh...@gmail.com>
Authored: Tue Apr 3 17:29:33 2018 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue Apr 3 17:29:33 2018 +0800
----------------------------------------------------------------------
.../Sources/Component/RecycleList/WXComponent+DataBinding.mm | 2 +-
.../Sources/Component/RecycleList/WXRecycleListComponent.m | 2 +-
.../WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m | 2 +-
ios/sdk/WeexSDK/Sources/Component/WXListComponent.m | 4 ++--
ios/sdk/WeexSDK/Sources/Model/WXComponent.m | 2 +-
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 2 +-
ios/sdk/WeexSDK/Sources/Utility/WXDiffUtil.m | 6 +++---
7 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d541c483/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXComponent+DataBinding.mm
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXComponent+DataBinding.mm b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXComponent+DataBinding.mm
index aeb6a36..3bbcfe6 100644
--- a/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXComponent+DataBinding.mm
+++ b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXComponent+DataBinding.mm
@@ -102,7 +102,7 @@ static JSContext *jsContext;
if (self.attributes[@"@isComponentRoot"]) {
if (![recycleListComponent.dataManager virtualComponentDataWithIndexPath:indexPath]) {
static NSUInteger __componentId = 0;
- self->_virtualComponentId = [NSString stringWithFormat:@"%@@%ld", listRef, __componentId % (2048*1024)];
+ self->_virtualComponentId = [NSString stringWithFormat:@"%@%lu", listRef, (unsigned long)__componentId % (2048*1024)];
__componentId++;
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
[[WXSDKManager bridgeMgr] callComponentHook:self.weexInstance.instanceId componentId:self.attributes[@"@templateId"] type:@"lifecycle" hook:@"create" args:@[self->_virtualComponentId, newData] competion:^(JSValue *value) {
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d541c483/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXRecycleListComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXRecycleListComponent.m b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXRecycleListComponent.m
index dd0556a..8e58f17 100644
--- a/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXRecycleListComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/RecycleList/WXRecycleListComponent.m
@@ -428,7 +428,7 @@ WX_EXPORT_METHOD(@selector(setListData:))
});
#ifdef DEBUG
double duration = -[startTime timeIntervalSinceNow] * 1000;
- WXLogDebug(@"cell:%zi update data time:%f", indexPath.item, duration);
+ WXLogDebug(@"cell:%li update data time:%f", (long)indexPath.item, duration);
#endif
NSValue *cachedSize = _sizeCache[indexPath];
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d541c483/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m
index 99c6b22..7ca1de6 100644
--- a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m
@@ -387,7 +387,7 @@ typedef enum : NSUInteger {
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
{
- WXLogDebug(@"section number:%zi", [self.dataController numberOfSections]);
+ WXLogDebug(@"section number:%li", (long)[self.dataController numberOfSections]);
return [self.dataController numberOfSections];
}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d541c483/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m
index 4b92306..eec9e79 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m
@@ -400,7 +400,7 @@
[self.weexInstance.componentManager _addUITask:^{
if (isDeleteSection) {
- WXLogDebug(@"delete section:%zd", headerIndex);
+ WXLogDebug(@"delete section:%lu", (unsigned long)headerIndex);
[_completedSections removeObjectAtIndex:headerIndex];
}
@@ -409,7 +409,7 @@
}
if (completedReloadSection) {
- WXLogDebug(@"Reload section:%zd", reloadIndex);
+ WXLogDebug(@"Reload section:%lu", (unsigned long)reloadIndex);
_completedSections[reloadIndex] = completedReloadSection;
}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d541c483/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
index 55b591f..a454083 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
@@ -156,7 +156,7 @@
copyId = __copy % (1024*1024);
__copy++;
}
- NSString *copyRef = [NSString stringWithFormat:@"%zdcopy_of%@", copyId, _isTemplate ? self.ref : self->_templateComponent.ref];
+ NSString *copyRef = [NSString stringWithFormat:@"%ldcopy_of%@", (long)copyId, _isTemplate ? self.ref : self->_templateComponent.ref];
WXComponent *component = [[[self class] allocWithZone:zone] initWithRef:copyRef type:self.type styles:self.styles attributes:self.attributes events:self.events weexInstance:self.weexInstance];
if (_isTemplate) {
component->_templateComponent = self;
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d541c483/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
index 79abbbd..6469950 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
@@ -113,7 +113,7 @@ typedef enum : NSUInteger {
id configCenter = [WXSDKEngine handlerForProtocol:@protocol(WXConfigCenterProtocol)];
if ([configCenter respondsToSelector:@selector(configForKey:defaultValue:isDefault:)]) {
- _syncDestroyComponentManager = [configCenter configForKey:@"iOS_weex_ext_config.syncDestroyComponentManager" defaultValue:@(YES) isDefault:NULL];
+ _syncDestroyComponentManager = [[configCenter configForKey:@"iOS_weex_ext_config.syncDestroyComponentManager" defaultValue:@(YES) isDefault:NULL] boolValue];
}
[self addObservers];
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d541c483/ios/sdk/WeexSDK/Sources/Utility/WXDiffUtil.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Utility/WXDiffUtil.m b/ios/sdk/WeexSDK/Sources/Utility/WXDiffUtil.m
index fabdbd1..b1549fc 100644
--- a/ios/sdk/WeexSDK/Sources/Utility/WXDiffUtil.m
+++ b/ios/sdk/WeexSDK/Sources/Utility/WXDiffUtil.m
@@ -63,7 +63,7 @@ typedef enum : NSUInteger {
- (NSString *)description
{
- return [NSString stringWithFormat:@"<%@: %p; %zi inserts; %zi deletes; %zi updates", NSStringFromClass([self class]), self, _inserts.count, _deletes.count, _updates.count];
+ return [NSString stringWithFormat:@"<%@: %p; %lu inserts; %lu deletes; %lu updates", NSStringFromClass([self class]), self, (unsigned long)_inserts.count, (unsigned long)_deletes.count, (unsigned long)_updates.count];
}
@@ -186,9 +186,9 @@ typedef enum : NSUInteger {
int value = matrix[i][j];
NSString *result;
if (value < 10) {
- result = [NSString stringWithFormat:@"0%zi", value];
+ result = [NSString stringWithFormat:@"0%i", value];
} else {
- result = [NSString stringWithFormat:@"%zi", value];
+ result = [NSString stringWithFormat:@"%i", value];
}
[array addObject:result];
}