Skip to content

Commit a7bff69

Browse files
jabdelmalekcmumford
authored andcommitted
Fix LevelDB build when asserts are enabled in release builds. (bitcoin#367)
* Fix LevelDB build when asserts are enabled in release builds. BUG=https://bugs.chromium.org/p/chromium/issues/detail?id=603166 * fix * Add comment
1 parent ea992b4 commit a7bff69

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

table/format.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,14 @@ Status BlockHandle::DecodeFrom(Slice* input) {
3030
}
3131

3232
void Footer::EncodeTo(std::string* dst) const {
33-
#ifndef NDEBUG
3433
const size_t original_size = dst->size();
35-
#endif
3634
metaindex_handle_.EncodeTo(dst);
3735
index_handle_.EncodeTo(dst);
3836
dst->resize(2 * BlockHandle::kMaxEncodedLength); // Padding
3937
PutFixed32(dst, static_cast<uint32_t>(kTableMagicNumber & 0xffffffffu));
4038
PutFixed32(dst, static_cast<uint32_t>(kTableMagicNumber >> 32));
4139
assert(dst->size() == original_size + kEncodedLength);
40+
(void)original_size; // Disable unused variable warning.
4241
}
4342

4443
Status Footer::DecodeFrom(Slice* input) {

0 commit comments

Comments
 (0)