summaryrefslogtreecommitdiff
path: root/table/format.cc
diff options
context:
space:
mode:
authordgrogan@chromium.org <dgrogan@chromium.org@62dab493-f737-651d-591e-8d6aee1b9529>2011-04-20 22:48:11 +0000
committerdgrogan@chromium.org <dgrogan@chromium.org@62dab493-f737-651d-591e-8d6aee1b9529>2011-04-20 22:48:11 +0000
commitba6dac0e809b249532a7465f71a00ccda307161d (patch)
tree9aa494c1bb1bbbefba5bf12c520941dbe4abfec1 /table/format.cc
parent69c6d38342a1fab5f7f2921aa2e9c0e60ba90e35 (diff)
downloadleveldb-ba6dac0e809b249532a7465f71a00ccda307161d.tar.gz
@20776309
* env_chromium.cc should not export symbols. * Fix MSVC warnings. * Removed large value support. * Fix broken reference to documentation file git-svn-id: https://leveldb.googlecode.com/svn/trunk@24 62dab493-f737-651d-591e-8d6aee1b9529
Diffstat (limited to 'table/format.cc')
-rw-r--r--table/format.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/table/format.cc b/table/format.cc
index 8c6b0f3..63971db 100644
--- a/table/format.cc
+++ b/table/format.cc
@@ -36,7 +36,7 @@ void Footer::EncodeTo(std::string* dst) const {
metaindex_handle_.EncodeTo(dst);
index_handle_.EncodeTo(dst);
dst->resize(2 * BlockHandle::kMaxEncodedLength); // Padding
- PutFixed32(dst, static_cast<uint32_t>(kTableMagicNumber));
+ PutFixed32(dst, static_cast<uint32_t>(kTableMagicNumber & 0xffffffffu));
PutFixed32(dst, static_cast<uint32_t>(kTableMagicNumber >> 32));
assert(dst->size() == original_size + kEncodedLength);
}
@@ -71,7 +71,7 @@ Status ReadBlock(RandomAccessFile* file,
// Read the block contents as well as the type/crc footer.
// See table_builder.cc for the code that built this structure.
- size_t n = handle.size();
+ size_t n = static_cast<size_t>(handle.size());
char* buf = new char[n + kBlockTrailerSize];
Slice contents;
Status s = file->Read(handle.offset(), n + kBlockTrailerSize, &contents, buf);