-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
module: coverity fixes for ESM C++ #15275
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with comments.
src/module_wrap.cc
Outdated
} file_check; | ||
inline const struct file_check check_file(URL search, | ||
bool close = false, | ||
bool allow_dir = false) { | ||
struct file_check ret; | ||
struct file_check ret = { true, -1 }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary if all fields have a default initializer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
@@ -461,7 +461,6 @@ URL Resolve(std::string specifier, URL* base, bool read_pkg_json) { | |||
} else { | |||
return resolve_module(specifier, base); | |||
} | |||
return URL(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you replace this with an UNREACHABLE()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, would it not even be better to just remove the else instead and have the regular return afterwards?
PR-URL: nodejs#15275 Author: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Linting failed oddly.. trying again: https://ci.nodejs.org/job/node-test-linter/11804/ |
PR-URL: #15275 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 0fc402b |
PR-URL: nodejs/node#15275 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #15275 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node#15275 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
module