From d232cb156bf541db5105cc15319316e23bdef5d9 Mon Sep 17 00:00:00 2001 From: Chris BeHanna Date: Mon, 22 Dec 2014 16:56:27 -0600 Subject: [PATCH] Fix the build with -DNDEBUG. Dike out the body of VerifyCompactionResult. With assert() compiled out, the loop index variable in the inner loop was unused, breaking the build when -Werror is enabled. --- db/db_test.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/db_test.cc b/db/db_test.cc index cb2458954..a371cfd9e 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -8896,12 +8896,14 @@ namespace { void VerifyCompactionResult( const ColumnFamilyMetaData& cf_meta, const std::set& overlapping_file_numbers) { +#ifndef NDEBUG for (auto& level : cf_meta.levels) { for (auto& file : level.files) { assert(overlapping_file_numbers.find(file.name) == overlapping_file_numbers.end()); } } +#endif } const SstFileMetaData* PickFileRandomly(