-
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
GCC warnings when compiling files in src #26733
Comments
https://gist.github.com/refack/1cc202e9b507d63d108d5ba55293e540 with 167 warnings from MSVC |
PR-URL: nodejs#26735 Refs: nodejs#26733 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Richard Lau <[email protected]>
PR-URL: #26766 Ref #26733 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: nodejs#26735 Refs: nodejs#26733 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Richard Lau <[email protected]>
PR-URL: nodejs#26766 Ref nodejs#26733 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: #26735 Refs: #26733 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Richard Lau <[email protected]>
PR-URL: #26766 Ref #26733 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
@targos is this still an issue? |
@cjihrig Yes, I can still reproduce all warnings from the OP with GCC 8 and 9. |
@targos |
@targos hi. Can you describe the steps to reproduce these notifications? |
@bmsdave Hello. I can reproduce the warnings on my system (Fedora 30, GCC 9.2.1) with:
I removed the other two warnings from the OP because I can't reproduce them anymore. |
just wondering between this and #18983 , are we talking about the same thing? |
It doesn't look like the same thing. |
Not sure we can do anything about the rest of them: The The |
Turn the `strategy_` method pointer into an enum-based static dispatch. It's both safer and more secure (no chance of method pointer corruption) and it helps GCC see that the shift and suffix tables it's complaining about are unused in single char search mode. Fixes the following warning: ../src/string_search.h:113:30: warning: ‘search’ may be used uninitialized in this function [-Wmaybe-uninitialized] return (this->*strategy_)(subject, index); Fixes: nodejs#26733 Fixes: nodejs#31532 Fixes: nodejs#31798
Turn the `strategy_` method pointer into an enum-based static dispatch. It's both safer and more secure (no chance of method pointer corruption) and it helps GCC see that the shift and suffix tables it's complaining about are unused in single char search mode. Fixes the following warning: ../src/string_search.h:113:30: warning: ‘search’ may be used uninitialized in this function [-Wmaybe-uninitialized] return (this->*strategy_)(subject, index); Fixes: #26733 Refs: #31532 Refs: #31798 PR-URL: #31809 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
Turn the `strategy_` method pointer into an enum-based static dispatch. It's both safer and more secure (no chance of method pointer corruption) and it helps GCC see that the shift and suffix tables it's complaining about are unused in single char search mode. Fixes the following warning: ../src/string_search.h:113:30: warning: ‘search’ may be used uninitialized in this function [-Wmaybe-uninitialized] return (this->*strategy_)(subject, index); Fixes: #26733 Refs: #31532 Refs: #31798 PR-URL: #31809 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
I don't know if they are all fixable, but the first one is very annoying because it is emitted for (almost?) each C++ file:
The text was updated successfully, but these errors were encountered: