From 22fea0ba79331a894d25b62cbb708f04a344ba9c Mon Sep 17 00:00:00 2001 From: Peter Dillinger Date: Sat, 21 Dec 2019 20:56:57 -0800 Subject: [PATCH] Fix unused variable in release build Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/6237 Differential Revision: D19210304 Pulled By: pdillinger fbshipit-source-id: f6f050e995f4d210f812bb1d2020adbd751e1d5a --- db_stress_tool/db_stress_common.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/db_stress_tool/db_stress_common.h b/db_stress_tool/db_stress_common.h index cca79031c..26523db31 100644 --- a/db_stress_tool/db_stress_common.h +++ b/db_stress_tool/db_stress_common.h @@ -417,13 +417,12 @@ extern inline std::string Key(int64_t val) { // Given a string key, map it to an index into the expected values buffer extern inline bool GetIntVal(std::string big_endian_key, uint64_t* key_p) { - size_t levels = key_gen_ctx.weights.size(); size_t size_key = big_endian_key.size(); std::vector prefixes; // Trim the key to multiple of 8 bytes size_key &= ~7; - assert(size_key <= levels * sizeof(uint64_t)); + assert(size_key <= key_gen_ctx.weights.size() * sizeof(uint64_t)); // Pad with zeros to make it a multiple of 8. This function may be called // with a prefix, in which case we return the first index that falls