Commit 9d15c146 authored by Daniel Bevenius's avatar Daniel Bevenius
Browse files

test: suppress warning in test_environment.cc

Currently there is a compiler warning generated if a build defines
NDEBUG:

$ env CXXFLAGS='-DNDEBUG' make -j8 cctest
../test/cctest/test_environment.cc:
In function ‘void at_exit_js(void*)’:
../test/cctest/test_environment.cc:333:25: warning:
variable ‘obj’ set but not used [-Wunused-but-set-variable]
  333 |   v8::Local<v8::Object> obj = v8::Object::New(isolate);
      |                         ^~~

NDEBUG is currently not defined using the main branch but this
discovered when working on replacing OpenSSL 1.1.1 with OpenSSL 3.0.

This commit uses EXPECT statements instead of asserts to avoid the
warning.

PR-URL: https://github.com/nodejs/node/pull/38868


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarDarshan Sen <raisinten@gmail.com>
parent 306a57d3
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