From 42d14bef045abf9857b75ffd3d4da2f98c1db975 Mon Sep 17 00:00:00 2001 From: Dan Caspi Date: Wed, 16 Nov 2016 07:28:01 -0800 Subject: [PATCH] Enforcing semi-colon consistency between dev and release modes when calling RCTLog* Summary: The various RCTLog macros (`RCTLogWarn`, `RCTLogError`, etc..) are based on the `_RCTLog` macro, which, in its expanded form, has a semi-colon in DEV mode (i.e., when `RCTLOG_ENABLED` is set to 1), and doesn't have one when `RCTLOG_ENABLED` is set to 0. This could lead to a situation where code will compile in DEV but will fail to compile for prod. Fixing this by removing the semicolon from the DEV version (as should). Reviewed By: javache Differential Revision: D4189133 fbshipit-source-id: 54cb4e2c96d1e48d9df88464aa58b13af432c2bd --- React/Base/RCTLog.h | 2 +- React/Modules/RCTAsyncLocalStorage.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/React/Base/RCTLog.h b/React/Base/RCTLog.h index 27cdf3158..d6c3a215e 100644 --- a/React/Base/RCTLog.h +++ b/React/Base/RCTLog.h @@ -124,7 +124,7 @@ RCT_EXTERN void RCTPerformBlockWithLogPrefix(void (^block)(void), NSString *pref * Private logging function - ignore this. */ #if RCTLOG_ENABLED -#define _RCTLog(lvl, ...) _RCTLogNativeInternal(lvl, __FILE__, __LINE__, __VA_ARGS__); +#define _RCTLog(lvl, ...) _RCTLogNativeInternal(lvl, __FILE__, __LINE__, __VA_ARGS__) #else #define _RCTLog(lvl, ...) do { } while (0) #endif diff --git a/React/Modules/RCTAsyncLocalStorage.m b/React/Modules/RCTAsyncLocalStorage.m index e3972229e..34442779b 100644 --- a/React/Modules/RCTAsyncLocalStorage.m +++ b/React/Modules/RCTAsyncLocalStorage.m @@ -219,7 +219,7 @@ RCT_EXPORT_MODULE() RCTAssertThread(RCTGetMethodQueue(), @"Must be executed on storage thread"); #if TARGET_OS_TV - RCTLogWarn(@"Persistent storage is not supported on tvOS, your data may be removed at any point.") + RCTLogWarn(@"Persistent storage is not supported on tvOS, your data may be removed at any point."); #endif NSError *error = nil;