module: coverity fixes for ESM C++

PR-URL: https://github.com/nodejs/node/pull/15275
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Bradley Farias 2017-09-08 08:50:44 -05:00 committed by James M Snell
parent 2e8217c64e
commit 0fc402b992

View File

@ -325,7 +325,7 @@ inline const struct read_result read_file(uv_file file) {
} }
struct file_check { struct file_check {
bool failed = true; bool failed = true;
uv_file file; uv_file file = -1;
} file_check; } file_check;
inline const struct file_check check_file(URL search, inline const struct file_check check_file(URL search,
bool close = false, bool close = false,
@ -461,7 +461,7 @@ URL Resolve(std::string specifier, URL* base, bool read_pkg_json) {
} else { } else {
return resolve_module(specifier, base); return resolve_module(specifier, base);
} }
return URL(""); UNREACHABLE();
} }
void ModuleWrap::Resolve(const FunctionCallbackInfo<Value>& args) { void ModuleWrap::Resolve(const FunctionCallbackInfo<Value>& args) {