Skip to content

Commit

Permalink
src: fix -Wunused-result compiler warning
Browse files Browse the repository at this point in the history
Fix a warning that was introduced in commit 67af1ad ("src: refactor
CopyProperties to remove JS") from a few days ago.  This particular
change was suggested by me, mea culpa.

Fixes the following warning:

    ../src/node_contextify.cc:151:13: warning: ignoring return
    value of function declared with warn_unused_result attribute
    [-Wunused-result]
                sandbox_obj->DefineProperty(context, key, *desc);

PR-URL: #11197
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
bnoordhuis committed Feb 9, 2017
1 parent 039a813 commit 215a649
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class ContextifyContext {
desc->set_enumerable(desc_vm_context
->Get(context, env()->enumerable_string()).ToLocalChecked()
->BooleanValue(context).FromJust());
sandbox_obj->DefineProperty(context, key, *desc);
CHECK(sandbox_obj->DefineProperty(context, key, *desc).FromJust());
};

if (is_accessor) {
Expand Down

0 comments on commit 215a649

Please sign in to comment.