From 002b30c967a077464a560775434d8493b64fca9f Mon Sep 17 00:00:00 2001 From: Yanqin Jin Date: Wed, 7 Oct 2020 20:09:28 -0700 Subject: [PATCH] Fix clang analyzer (#7518) Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/7518 Test Plan: ``` $USE_CLANG=1 make analyze ``` Reviewed By: zhichao-cao Differential Revision: D24175390 Pulled By: riversand963 fbshipit-source-id: c70121652908cf5d450120c38ab65cc595332ca7 --- db/db_impl/db_impl_write.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/db_impl/db_impl_write.cc b/db/db_impl/db_impl_write.cc index 3015524d3..0780ab789 100644 --- a/db/db_impl/db_impl_write.cc +++ b/db/db_impl/db_impl_write.cc @@ -125,7 +125,7 @@ Status DBImpl::WriteImpl(const WriteOptions& write_options, ? batch_cnt // every key is a sub-batch consuming a seq : WriteBatchInternal::Count(my_batch); - uint64_t seq; + uint64_t seq = 0; // Use a write thread to i) optimize for WAL write, ii) publish last // sequence in in increasing order, iii) call pre_release_callback serially Status status = WriteImplWALOnly(