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

src: fix compiler warning in inspector_profiler.cc #29660

Closed

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Sep 23, 2019

Currently, the following compiler warnings is generated:

../src/inspector_profiler.cc:231:5: warning:
ignoring return value of function declared with 'warn_unused_result'
attribute [-Wunused-result]
profile->Set(context, FIXED_ONE_BYTE_STRING(isolate, "source-map-cache")
^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

This commit adds a .ToChecked() call to avoid the warning.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Currently, the following compiler warnings is generated:

../src/inspector_profiler.cc:231:5: warning:
ignoring return value of function declared with 'warn_unused_result'
attribute [-Wunused-result]
profile->Set(context, FIXED_ONE_BYTE_STRING(isolate, "source-map-cache")
^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

This commit adds a .ToChecked() call to avoid the warning.
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. inspector Issues and PRs related to the V8 inspector protocol labels Sep 23, 2019
@nodejs-github-bot
Copy link
Collaborator

@danbev danbev added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 24, 2019
danbev added a commit that referenced this pull request Sep 26, 2019
Currently, the following compiler warnings is generated:

../src/inspector_profiler.cc:231:5: warning:
ignoring return value of function declared with 'warn_unused_result'
attribute [-Wunused-result]
profile->Set(context, FIXED_ONE_BYTE_STRING(isolate, "source-map-cache")
^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

This commit adds a .ToChecked() call to avoid the warning.

PR-URL: #29660
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@danbev
Copy link
Contributor Author

danbev commented Sep 26, 2019

Landed in 899dd15.

@danbev danbev closed this Sep 26, 2019
@danbev danbev deleted the compiler-warning-inspector_profiler branch September 26, 2019 04:19
targos pushed a commit that referenced this pull request Oct 1, 2019
Currently, the following compiler warnings is generated:

../src/inspector_profiler.cc:231:5: warning:
ignoring return value of function declared with 'warn_unused_result'
attribute [-Wunused-result]
profile->Set(context, FIXED_ONE_BYTE_STRING(isolate, "source-map-cache")
^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

This commit adds a .ToChecked() call to avoid the warning.

PR-URL: #29660
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. inspector Issues and PRs related to the V8 inspector protocol
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants