From: WLeoo <67936159+WLeoo@users.noreply.github.com> Date: Thu, 1 Dec 2022 03:27:28 +0000 (-0800) Subject: Fix an uninitialized variable warning for g++ 12.2.0 (#10995) X-Git-Tag: v7.10.2~60 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=be3a62a2e7f70b573c8d977a90650bb217c62aa8;p=rocksdb.git Fix an uninitialized variable warning for g++ 12.2.0 (#10995) 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 --- 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_;