add assert to silence clang warning (#4871)

Summary:
currently clang analyze fails with the following warning:
> utilities/transactions/write_prepared_transaction_test.cc:1451:5: warning: Forming reference to null pointer
    ASSERT_GT(wp_db->max_evicted_seq_, 0);  // max after recovery
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4871

Differential Revision: D13638053

Pulled By: miasantreble

fbshipit-source-id: b192b0c13c411c58defc9e280b34cdfcab3fa8e3
main
Zhongyi Xie 6 years ago committed by Facebook Github Bot
parent 349c7cceff
commit 6a4ec41fed
  1. 1
      utilities/transactions/write_prepared_transaction_test.cc

@ -1448,6 +1448,7 @@ TEST_P(WritePreparedTransactionTest, IsInSnapshotEmptyMapTest) {
db_impl->FlushWAL(true);
ReOpenNoDelete();
WritePreparedTxnDB* wp_db = dynamic_cast<WritePreparedTxnDB*>(db);
assert(wp_db != nullptr);
ASSERT_GT(wp_db->max_evicted_seq_, 0); // max after recovery
// Take a snapshot right after recovery
const Snapshot* snap = db->GetSnapshot();

Loading…
Cancel
Save