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
main
Yanqin Jin 3 years ago committed by Facebook GitHub Bot
parent 3b6dc049f7
commit 565fcead22
  1. 1
      utilities/transactions/write_committed_transaction_ts_test.cc

@ -263,6 +263,7 @@ TEST_P(WriteCommittedTxnWithTsTest, TransactionDbLevelApi) {
PutFixed64(&ts_str, 100); PutFixed64(&ts_str, 100);
Slice value = value_str; Slice value = value_str;
assert(db);
ASSERT_TRUE( ASSERT_TRUE(
db->Put(WriteOptions(), handles_[1], "foo", "bar").IsNotSupported()); db->Put(WriteOptions(), handles_[1], "foo", "bar").IsNotSupported());
ASSERT_TRUE(db->Delete(WriteOptions(), handles_[1], "foo").IsNotSupported()); ASSERT_TRUE(db->Delete(WriteOptions(), handles_[1], "foo").IsNotSupported());

Loading…
Cancel
Save