Commit c7c9e20e authored by Daniel Bevenius's avatar Daniel Bevenius
Browse files

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: https://github.com/nodejs/node/pull/15112


Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarTobias Nießen <tniessen@tnie.de>
Reviewed-By: default avatarMichaël Zasso <targos@protonmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 08984b26
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment