n-api: fix -Wmaybe-uninitialized compiler warning

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 <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
Ben Noordhuis committed 2017-07-05 16:53:04 +02:00
1 parent c9b6d95161
commit e36917bdc1
1 file changed
+1 -1
+1 -1
View File
@@ -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;