mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-21 10:34:31 +08:00
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:
committed by
Facebook Github Bot
parent
9ea1295179
commit
0c0540965a
@@ -161,6 +161,8 @@ void NativeToJsBridge::callFunction(
|
||||
"JSCall",
|
||||
systraceCookie);
|
||||
SystraceSection s("NativeToJsBridge::callFunction", "module", module, "method", method);
|
||||
#else
|
||||
(void)(systraceCookie);
|
||||
#endif
|
||||
// This is safe because we are running on the executor's thread: it won't
|
||||
// destruct until after it's been unregistered (which we check above) and
|
||||
@@ -191,6 +193,8 @@ void NativeToJsBridge::invokeCallback(double callbackId, folly::dynamic&& argume
|
||||
"<callback>",
|
||||
systraceCookie);
|
||||
SystraceSection s("NativeToJsBridge::invokeCallback");
|
||||
#else
|
||||
(void)(systraceCookie);
|
||||
#endif
|
||||
executor->invokeCallback(callbackId, arguments);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user