Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed

Conversation

empyrical
Copy link
Contributor

@empyrical empyrical commented Nov 12, 2018

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

Test Plan:

These warning no longer appear when building these files.

Changelog:

[General] [Fixed] - Silence "unused lambda capture" warnings in CxxReact

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 12, 2018
@empyrical empyrical requested a review from shergin November 12, 2018 00:48
@pull-bot
Copy link

Warnings
⚠️

📋 Release Notes - This PR appears to be missing Release Notes.

Generated by 🚫 dangerJS

@shergin
Copy link
Contributor

shergin commented Nov 12, 2018

I am a bit concerned about defining the macro twice. Maybe we can just inline this?

@empyrical
Copy link
Contributor Author

Yep, can do that!

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Nov 12, 2018
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shergin is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification.

@facebook-github-bot facebook-github-bot added Import Failed and removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Nov 13, 2018
@react-native-bot
Copy link
Collaborator

@empyrical merged commit 0c05409 into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Nov 16, 2018
@react-native-bot react-native-bot added the Merged This PR has been merged. label Nov 16, 2018
kelset pushed a commit that referenced this pull request Nov 26, 2018
…2240)

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: #22240

Differential Revision: D13031358

Pulled By: shergin

fbshipit-source-id: 8ccfc226b65e32abda6abb573f77a6589bd19dcd
t-nanava pushed a commit to microsoft/react-native-macos that referenced this pull request Jun 17, 2019
…cebook#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: facebook#22240

Differential Revision: D13031358

Pulled By: shergin

fbshipit-source-id: 8ccfc226b65e32abda6abb573f77a6589bd19dcd
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants