From 6af0bfe1a0006511325bf17bf36da6f36721d10e Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 6 Feb 2017 14:33:36 +0100 Subject: [PATCH] src: fix -Wunused-result compiler warning 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: https://github.com/nodejs/node/pull/11197 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Daniel Bevenius Reviewed-By: James M Snell Reviewed-By: Michael Dawson --- src/node_contextify.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 4efb420fa128b7..7710c252b2c35b 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -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) {