Skip to content

Commit ddebd29

Browse files
tniessentargos
authored andcommitted
test: fix compiler warning in NodeCryptoEnv
This fixes a warning in line 26: "warning: value computed is not used" when calling BIO_seek(). Refs: #47160 PR-URL: #49206 Reviewed-By: Michael Dawson <[email protected]>
1 parent 9ca85b5 commit ddebd29

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/cctest/test_node_crypto_env.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ TEST_F(NodeCryptoEnv, LoadBIO) {
2323
Local<String> key = String::NewFromUtf8(isolate_, "abcdef").ToLocalChecked();
2424
node::crypto::BIOPointer bio(node::crypto::LoadBIO(*env, key));
2525
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
26-
BIO_seek(bio.get(), 2);
27-
ASSERT_EQ(BIO_tell(bio.get()), 2);
26+
const int ofs = 2;
27+
ASSERT_EQ(BIO_seek(bio.get(), ofs), ofs);
28+
ASSERT_EQ(BIO_tell(bio.get()), ofs);
2829
#endif
2930
ASSERT_EQ(ERR_peek_error(), 0UL) << "There should not have left "
3031
"any errors on the OpenSSL error stack\n";

0 commit comments

Comments
 (0)