Browse Source

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>
v6
Ben Noordhuis 8 years ago
parent
commit
e36917bdc1
  1. 2
      src/node_api.cc

2
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;

Loading…
Cancel
Save