Skip to content

Commit

Permalink
test: fix compiler warning in NodeCryptoEnv
Browse files Browse the repository at this point in the history
This fixes a warning in line 26: "warning: value computed is not used"
when calling BIO_seek().

Refs: nodejs#47160
  • Loading branch information
tniessen committed Aug 16, 2023
1 parent 7215176 commit 5d79fb2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/cctest/test_node_crypto_env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ TEST_F(NodeCryptoEnv, LoadBIO) {
Local<String> key = String::NewFromUtf8(isolate_, "abcdef").ToLocalChecked();
node::crypto::BIOPointer bio(node::crypto::LoadBIO(*env, key));
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
BIO_seek(bio.get(), 2);
ASSERT_EQ(BIO_tell(bio.get()), 2);
const int ofs = 2;
ASSERT_EQ(BIO_seek(bio.get(), ofs), ofs);
ASSERT_EQ(BIO_tell(bio.get()), ofs);
#endif
ASSERT_EQ(ERR_peek_error(), 0UL) << "There should not have left "
"any errors on the OpenSSL error stack\n";
Expand Down

0 comments on commit 5d79fb2

Please sign in to comment.