From 5d79fb29018559119afebc6be4a4a49e9f241a94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Wed, 16 Aug 2023 23:42:54 +0000 Subject: [PATCH] test: fix compiler warning in NodeCryptoEnv This fixes a warning in line 26: "warning: value computed is not used" when calling BIO_seek(). Refs: https://github.com/nodejs/node/pull/47160 --- test/cctest/test_node_crypto_env.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/cctest/test_node_crypto_env.cc b/test/cctest/test_node_crypto_env.cc index b42cdc107e8a94..001867720f5e80 100644 --- a/test/cctest/test_node_crypto_env.cc +++ b/test/cctest/test_node_crypto_env.cc @@ -23,8 +23,9 @@ TEST_F(NodeCryptoEnv, LoadBIO) { Local 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";