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

module: coverity fixes for ESM C++ #15275

Closed
wants to merge 1 commit into from
Closed

Conversation

bmeck
Copy link
Member

@bmeck bmeck commented Sep 8, 2017

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

module

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Sep 8, 2017
Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

LGTM with comments.

} 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 };
Copy link
Member

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?

Copy link
Member Author

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("");
Copy link
Member

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()?

Copy link
Member Author

Choose a reason for hiding this comment

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

added

Copy link
Member

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>
@jasnell
Copy link
Member

jasnell commented Sep 14, 2017

@jasnell
Copy link
Member

jasnell commented Sep 15, 2017

Linting failed oddly.. trying again: https://ci.nodejs.org/job/node-test-linter/11804/

jasnell pushed a commit that referenced this pull request Sep 15, 2017
PR-URL: #15275
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell
Copy link
Member

jasnell commented Sep 15, 2017

Landed in 0fc402b

@jasnell jasnell closed this Sep 15, 2017
addaleax pushed a commit to addaleax/ayo that referenced this pull request Sep 17, 2017
PR-URL: nodejs/node#15275
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
jasnell pushed a commit that referenced this pull request Sep 20, 2017
PR-URL: #15275
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Qard pushed a commit to Qard/ayo that referenced this pull request Sep 21, 2017
PR-URL: nodejs/node#15275
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
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
c++ Issues and PRs that require attention from people who are familiar with C++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants