src: fix compiler warnings in node_perf.cc
Currently, there are a few compiler warnings generated from node_perf.cc regarding unused return values:
../src/node_perf.cc:58:3: warning: ignoring return value of function
declared with warn_unused_result attribute [-Wunused-result]
env->performance_entry_callback()->Call(context,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
../src/node_perf.cc:293:5: warning: ignoring return value of function
declared with warn_unused_result attribute [-Wunused-result]
obj->Set(context, idx, args[idx]);
^~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
../src/node_perf.cc:373:3: warning: ignoring return value of function
declared with warn_unused_result attribute [-Wunused-result]
target->DefineOwnProperty(context,
^~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
../src/node_perf.cc:378:3: warning: ignoring return value of function
declared with warn_unused_result attribute [-Wunused-result]
target->DefineOwnProperty(context,
^~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
This commit add checks to avoid the warnings.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines