-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 warn_unused_result compiler warning #32241
Conversation
I wonder if we could add tests for this kind of thing. Maybe we are running into a gyp limitation, |
@sam-github One problem with |
It could, but then we would see, and fix it, as opposed to people later noticing and there being a stream (ok, continuous trickle?) of PRs to fix the warnings. I don't think we've a situation where there is a warning that can't be fixed across gcc* and clang*. I have in the past worked on multi-platform code where it wasn't possible to make code that satisfied all our compilers simultaneously, but I think clang and gcc are under some kind of social or technical pressure to not diverge like that. |
../src/node_file.cc:386:7: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result] PR-URL: nodejs#32241 Refs: nodejs#31972 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
../src/node_file.cc:386:7: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result] PR-URL: #32241 Refs: #31972 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
../src/node_file.cc:386:7: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result] PR-URL: #32241 Refs: #31972 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
../src/node_file.cc:386:7: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result] PR-URL: #32241 Refs: #31972 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Refs: #31972
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes