Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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/casts to avoid the warnings. PR-URL: #15112 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
- Loading branch information