Skip to content

Commit

Permalink
Fix build errors exposed by building against clang 5.0
Browse files Browse the repository at this point in the history
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 e846a9f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Libraries/Image/RCTImageCache.m
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion React/Base/RCTUtils.m
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion React/Views/RCTShadowView.m
Expand Up @@ -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, ...) \
Expand Down

0 comments on commit e846a9f

Please sign in to comment.