From c399704c7ae57f950ed1c6920bc43ad54e50c016 Mon Sep 17 00:00:00 2001 From: Zhichao Cao Date: Wed, 18 Dec 2019 00:48:48 -0800 Subject: [PATCH] Fix: remove the potential dead store variable in block_based_table_reader.cc (#6204) Summary: buf_offset does not need to get the value from req.len for othe final block. It can cause test fail for clan_analyze. Remove it. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6204 Test Plan: pass make asan_check Differential Revision: D19145335 Pulled By: zhichao-cao fbshipit-source-id: 8f6e74565746381b5c5ef598b97d746517b36e5b --- table/block_based/block_based_table_reader.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/table/block_based/block_based_table_reader.cc b/table/block_based/block_based_table_reader.cc index 1cd0e16cb..1a50bd02b 100644 --- a/table/block_based/block_based_table_reader.cc +++ b/table/block_based/block_based_table_reader.cc @@ -2374,7 +2374,6 @@ void BlockBasedTable::RetrieveMultipleBlocks( req.scratch = new char[req.len]; } else { req.scratch = scratch + buf_offset; - buf_offset += req.len; } req.status = IOStatus::OK(); read_reqs.emplace_back(req);