From 407b8b4d1f731989f1fb6173750e4cbd96b4b4e2 Mon Sep 17 00:00:00 2001 From: Alex Kring Date: Mon, 5 Jun 2017 23:22:27 -0700 Subject: [PATCH] Fixing compiler warning Summary: Compiler is giving a warning about an unused variable. Tested by compiling the source code and verifying the warning is removed. Closes https://github.com/facebook/react-native/pull/13819 Differential Revision: D5189680 Pulled By: shergin fbshipit-source-id: 89848fcd3e988d1c256b315cfa2ef60a62c2ad56 --- Libraries/RCTTest/RCTTestRunner.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Libraries/RCTTest/RCTTestRunner.m b/Libraries/RCTTest/RCTTestRunner.m index ae4009a02..4f5fab07f 100644 --- a/Libraries/RCTTest/RCTTestRunner.m +++ b/Libraries/RCTTest/RCTTestRunner.m @@ -141,11 +141,14 @@ expectErrorBlock:(BOOL(^)(NSString *error))expectErrorBlock RCTSetLogFunction(defaultLogFunction); +#if RCT_DEV NSArray *nonLayoutSubviews = [vc.view.subviews filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(id subview, NSDictionary *bindings) { return ![NSStringFromClass([subview class]) isEqualToString:@"_UILayoutGuide"]; }]]; - RCTAssert(nonLayoutSubviews.count == 0, @"There shouldn't be any other views: %@", nonLayoutSubviews); + RCTAssert(nonLayoutSubviews.count == 0, @"There shouldn't be any other views: %@", nonLayoutSubviews); +#endif + if (expectErrorBlock) { RCTAssert(expectErrorBlock(error), @"Expected an error but nothing matched."); } else {