From e5f1bfc26368b52b9e5d0099f9fca5ef7b448de8 Mon Sep 17 00:00:00 2001 From: Peter Dillinger Date: Tue, 7 Apr 2020 15:58:09 -0700 Subject: [PATCH] Fix initializer syntax for old Xcode compiler (#6662) Summary: Example compiler output, from OSX TEST_GROUP=3: db/flush_job_test.cc:185:7: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] kInvalidBlobFileNumber, 5, 103, 17, 102, 101}; Apparently permitted in newer version, but worth working around. https://stackoverflow.com/questions/31555584/why-is-clang-warning-suggest-braces-around-initialization-of-subobject-wmis Pull Request resolved: https://github.com/facebook/rocksdb/pull/6662 Test Plan: CI (temporarily including OSX TEST_GROUP=3 in Travis) Reviewed By: ltamasi Differential Revision: D20901009 Pulled By: pdillinger fbshipit-source-id: 5338878613b5725e5d632c8858904de467dc4692 --- db/flush_job_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/flush_job_test.cc b/db/flush_job_test.cc index cee6d61e4..823a566b9 100644 --- a/db/flush_job_test.cc +++ b/db/flush_job_test.cc @@ -181,8 +181,8 @@ TEST_F(FlushJobTest, NonEmpty) { // Note: the first two blob references will not be considered when resolving // the oldest blob file referenced (the first one is inlined TTL, while the // second one is TTL and thus points to a TTL blob file). - constexpr std::array blob_file_numbers{ - kInvalidBlobFileNumber, 5, 103, 17, 102, 101}; + constexpr std::array blob_file_numbers{{ + kInvalidBlobFileNumber, 5, 103, 17, 102, 101}}; for (size_t i = 0; i < blob_file_numbers.size(); ++i) { std::string key(ToString(i + 10001)); std::string blob_index;