Permalink
Browse files

Fix build errors exposed by building against clang 5.0

Reviewed By: rachit-siamwalla

Differential Revision: D5828898

fbshipit-source-id: 23fa587bcd1d1b6c612cc816f1aa7b03da0c187d
  • Loading branch information...
Ktwu authored and facebook-github-bot committed Sep 14, 2017
1 parent e8c83d1 commit e846a9f82fb7a7dcfe6f55d40c3e4cd3c9b17e77
Showing with 4 additions and 4 deletions.
  1. +2 −2 Libraries/Image/RCTImageCache.m
  2. +1 −1 React/Base/RCTUtils.m
  3. +1 −1 React/Views/RCTShadowView.m
@@ -24,8 +24,8 @@
static NSString *RCTCacheKeyForImage(NSString *imageTag, CGSize size, CGFloat scale,
RCTResizeMode resizeMode, NSString *responseDate)
{
return [NSString stringWithFormat:@"%@|%g|%g|%g|%zd|%@",
imageTag, size.width, size.height, scale, resizeMode, responseDate];
return [NSString stringWithFormat:@"%@|%g|%g|%g|%lld|%@",
imageTag, size.width, size.height, scale, (long long)resizeMode, responseDate];
}
@implementation RCTImageCache
View
@@ -412,7 +412,7 @@ BOOL RCTClassOverridesInstanceMethod(Class cls, SEL selector)
NSDictionary<NSString *, id> *RCTJSErrorFromNSError(NSError *error)
{
NSString *codeWithDomain = [NSString stringWithFormat:@"E%@%zd", error.domain.uppercaseString, error.code];
NSString *codeWithDomain = [NSString stringWithFormat:@"E%@%lld", error.domain.uppercaseString, (long long)error.code];
return RCTJSErrorFromCodeMessageAndNSError(codeWithDomain,
error.localizedDescription,
error);
@@ -66,7 +66,7 @@ + (YGConfigRef)yogaConfig
static void RCTPrint(YGNodeRef node)
{
RCTShadowView *shadowView = (__bridge RCTShadowView *)YGNodeGetContext(node);
printf("%s(%zd), ", shadowView.viewName.UTF8String, shadowView.reactTag.integerValue);
printf("%s(%lld), ", shadowView.viewName.UTF8String, (long long)shadowView.reactTag.integerValue);
}
#define RCT_SET_YGVALUE(ygvalue, setter, ...) \

0 comments on commit e846a9f

Please sign in to comment.