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
main
Peter Dillinger 5 years ago committed by Facebook GitHub Bot
parent 3ff603171d
commit e5f1bfc263
  1. 4
      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 // 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 // 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). // second one is TTL and thus points to a TTL blob file).
constexpr std::array<uint64_t, 6> blob_file_numbers{ constexpr std::array<uint64_t, 6> blob_file_numbers{{
kInvalidBlobFileNumber, 5, 103, 17, 102, 101}; kInvalidBlobFileNumber, 5, 103, 17, 102, 101}};
for (size_t i = 0; i < blob_file_numbers.size(); ++i) { for (size_t i = 0; i < blob_file_numbers.size(); ++i) {
std::string key(ToString(i + 10001)); std::string key(ToString(i + 10001));
std::string blob_index; std::string blob_index;

Loading…
Cancel
Save