From be3a62a2e7f70b573c8d977a90650bb217c62aa8 Mon Sep 17 00:00:00 2001 From: WLeoo <67936159+WLeoo@users.noreply.github.com> Date: Wed, 30 Nov 2022 19:27:28 -0800 Subject: [PATCH] Fix an uninitialized variable warning for g++ 12.2.0 (#10995) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: /home/wl/rocksdbtry/rocksdb-WL/util/bloom_test.cc: In constructor ‘rocksdb::RawFilterTester::RawFilterTester()’: /home/wl/rocksdbtry/rocksdb-WL/util/bloom_test.cc:813:40: error: member ‘rocksdb::RawFilterTester::data_’ is used uninitialized [-Werror=uninitialized] Pull Request resolved: https://github.com/facebook/rocksdb/pull/10995 Reviewed By: cbi42 Differential Revision: D41620186 Pulled By: ajkr fbshipit-source-id: a6ebd3820ef12e0af322cbfb7eb553de5bdfcb29 --- util/bloom_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/bloom_test.cc b/util/bloom_test.cc index 9d509ac3d..06dd1de06 100644 --- a/util/bloom_test.cc +++ b/util/bloom_test.cc @@ -806,7 +806,7 @@ TEST_P(FullBloomTest, Schema) { struct RawFilterTester { // Buffer, from which we always return a tail Slice, so the // last five bytes are always the metadata bytes. - std::array data_; + std::array data_{}; // Points five bytes from the end char* metadata_ptr_;