CxxReact: Silence 'unused lambda capture' warnings in open-source (#22240)

Summary:
This pull request silences build warnings like this in open-source:

```
{snip}/ReactCommon/cxxreact/CxxNativeModule.cpp:134:85: warning: lambda capture 'callId' is not used [-Wunused-lambda-capture]
  messageQueueThread_->runOnQueue([method, params=std::move(params), first, second, callId] () {
```

These are variables used by "fbsystrace", which is not open-sourced.

An  unused statement has been added to the affected files in the `#else` for the `#ifdef WITH_FBSYSTRACE` conditionals
Pull Request resolved: https://github.com/facebook/react-native/pull/22240

Differential Revision: D13031358

Pulled By: shergin

fbshipit-source-id: 8ccfc226b65e32abda6abb573f77a6589bd19dcd
This commit is contained in:
empyrical
2018-11-16 10:32:42 -08:00
committed by Facebook Github Bot
parent 9ea1295179
commit 0c0540965a
2 changed files with 6 additions and 0 deletions

View File

@@ -136,6 +136,8 @@ void CxxNativeModule::invoke(unsigned int reactMethodId, folly::dynamic&& params
if (callId != -1) {
fbsystrace_end_async_flow(TRACE_TAG_REACT_APPS, "native", callId);
}
#else
(void)(callId);
#endif
SystraceSection s(method.name.c_str());
try {