Fix release build (#6690)

Summary:
Fix release build caused by variable defined but unused.

Test plan (devserver)
```
make release
```
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6690

Reviewed By: cheng-chang

Differential Revision: D20980571

Pulled By: riversand963

fbshipit-source-id: c3f3b13f81dce4bdb19876dc2e710d5902ff8a02
main
Yanqin Jin 5 years ago committed by Facebook GitHub Bot
parent 5c19a441c4
commit eeb3cf3f58
  1. 16
      db/db_with_timestamp_basic_test.cc
  2. 6
      test_util/testutil.cc

@ -26,22 +26,8 @@ class DBBasicTestWithTimestampBase : public DBTestBase {
protected:
static std::string Key1(uint64_t k) {
uint32_t x = 1;
const bool is_little_endian = (*reinterpret_cast<char*>(&x) != 0);
std::string ret;
if (is_little_endian) {
ret.assign(reinterpret_cast<char*>(&k), sizeof(k));
} else {
ret.resize(sizeof(k));
ret[0] = k & 0xff;
ret[1] = (k >> 8) & 0xff;
ret[2] = (k >> 16) & 0xff;
ret[3] = (k >> 24) & 0xff;
ret[4] = (k >> 32) & 0xff;
ret[5] = (k >> 40) & 0xff;
ret[6] = (k >> 48) & 0xff;
ret[7] = (k >> 56) & 0xff;
}
PutFixed64(&ret, k);
std::reverse(ret.begin(), ret.end());
return ret;
}

@ -154,10 +154,8 @@ class ComparatorWithU64TsImpl : public Comparator {
return cmp_without_ts_->Compare(lhs, rhs);
}
int CompareTimestamp(const Slice& ts1, const Slice& ts2) const override {
size_t ts_sz = timestamp_size();
assert(ts1.size() == ts_sz);
assert(ts2.size() == ts_sz);
assert(ts_sz == sizeof(uint64_t));
assert(ts1.size() == sizeof(uint64_t));
assert(ts2.size() == sizeof(uint64_t));
uint64_t lhs = DecodeFixed64(ts1.data());
uint64_t rhs = DecodeFixed64(ts2.data());
if (lhs < rhs) {

Loading…
Cancel
Save