Skip to content

Commit

Permalink
n-api: fix -Wmaybe-uninitialized compiler warning
Browse files Browse the repository at this point in the history
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.

Backport-PR-URL: #19447
PR-URL: #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>
  • Loading branch information
bnoordhuis authored and MylesBorins committed Apr 16, 2018
1 parent 33821c3 commit 8e2a26d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_api.cc
Expand Up @@ -2326,7 +2326,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;

Expand Down

0 comments on commit 8e2a26d

Please sign in to comment.