Skip to content

Commit 8e2a26d

Browse files
bnoordhuisMylesBorins
authored andcommitted
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. 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>
1 parent 33821c3 commit 8e2a26d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_api.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2326,7 +2326,7 @@ napi_status napi_instanceof(napi_env env,
23262326
}
23272327

23282328
if (env->has_instance_available) {
2329-
napi_value value, js_result, has_instance = nullptr;
2329+
napi_value value, js_result = nullptr, has_instance = nullptr;
23302330
napi_status status = napi_generic_failure;
23312331
napi_valuetype value_type;
23322332

0 commit comments

Comments
 (0)