From 53bf9020d1de4811f1c6772fe7020ae5a358b429 Mon Sep 17 00:00:00 2001 From: Bradley Farias Date: Fri, 8 Sep 2017 08:50:44 -0500 Subject: [PATCH] module: coverity fixes for ESM C++ PR-URL: https://github.com/nodejs/node/pull/15275 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell --- src/module_wrap.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/module_wrap.cc b/src/module_wrap.cc index 05bbe04ef2..cd3cc2fde0 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -325,7 +325,7 @@ inline const struct read_result read_file(uv_file file) { } struct file_check { bool failed = true; - uv_file file; + uv_file file = -1; } file_check; inline const struct file_check check_file(URL search, bool close = false, @@ -461,7 +461,7 @@ URL Resolve(std::string specifier, URL* base, bool read_pkg_json) { } else { return resolve_module(specifier, base); } - return URL(""); + UNREACHABLE(); } void ModuleWrap::Resolve(const FunctionCallbackInfo& args) {