From 565fcead22f819e0df9c7cbaadfdf84b2feea8be Mon Sep 17 00:00:00 2001 From: Yanqin Jin Date: Wed, 9 Mar 2022 10:13:02 -0800 Subject: [PATCH] Fix clang-analyze by adding assertion (#9682) Summary: Clang-analyze complains about potential nullptr dereference. Fix by adding an assertion to make clang happy. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9682 Test Plan: USE_CLANG=1 make -j20 analyze_incremental Reviewed By: ltamasi Differential Revision: D34755210 Pulled By: riversand963 fbshipit-source-id: 948e1899846ee1aa05a1b500a11ff43b0b412e0a --- utilities/transactions/write_committed_transaction_ts_test.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/utilities/transactions/write_committed_transaction_ts_test.cc b/utilities/transactions/write_committed_transaction_ts_test.cc index 57ea6b303..980289846 100644 --- a/utilities/transactions/write_committed_transaction_ts_test.cc +++ b/utilities/transactions/write_committed_transaction_ts_test.cc @@ -263,6 +263,7 @@ TEST_P(WriteCommittedTxnWithTsTest, TransactionDbLevelApi) { PutFixed64(&ts_str, 100); Slice value = value_str; + assert(db); ASSERT_TRUE( db->Put(WriteOptions(), handles_[1], "foo", "bar").IsNotSupported()); ASSERT_TRUE(db->Delete(WriteOptions(), handles_[1], "foo").IsNotSupported());