From f3933049e50d17d94f1fed96ff0483a774158d28 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 3 Jul 2017 12:11:35 +0200 Subject: [PATCH] n-api: fix -Wmaybe-uninitialized compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not an actual bug, as far as I can tell, the compiler is simply not smart enough to figure out that the offending code path isn't reached with an uninitialized value. PR-URL: https://github.com/nodejs/node/pull/14053 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig Reviewed-By: Daniel Bevenius Reviewed-By: Franziska Hinkelmann Reviewed-By: Michaƫl Zasso --- src/node_api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_api.cc b/src/node_api.cc index 485eefa9446c43..6c2e70adbaf71e 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -2323,7 +2323,7 @@ napi_status napi_instanceof(napi_env env, } if (env->has_instance_available) { - napi_value value, js_result, has_instance = nullptr; + napi_value value, js_result = nullptr, has_instance = nullptr; napi_status status = napi_generic_failure; napi_valuetype value_type;