diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-04-16 12:27:06 -0700 |
---|---|---|
committer | Victor Costan <pwnall@chromium.org> | 2018-04-16 18:13:09 -0700 |
commit | 14cce848e7b8a040a8f457d5a796722a55e19597 (patch) | |
tree | aff9aeabacea713a6606dd9bfa3a6184384798b1 | |
parent | 8046a51b21114d3575421bfc78b1d98b1678720a (diff) | |
download | leveldb-14cce848e7b8a040a8f457d5a796722a55e19597.tar.gz |
Fix sign mismatch warnings in GCC.
This was contributed in https://github.com/google/leveldb/pull/492
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193080913
-rw-r--r-- | db/memtable.cc | 2 | ||||
-rw-r--r-- | db/version_set.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/db/memtable.cc b/db/memtable.cc index bfec0a7..287afdb 100644 --- a/db/memtable.cc +++ b/db/memtable.cc @@ -101,7 +101,7 @@ void MemTable::Add(SequenceNumber s, ValueType type, p += 8; p = EncodeVarint32(p, val_size); memcpy(p, value.data(), val_size); - assert((p + val_size) - buf == encoded_len); + assert(p + val_size == buf + encoded_len); table_.Insert(buf); } diff --git a/db/version_set.cc b/db/version_set.cc index 02cc66f..c27ccad 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -20,7 +20,7 @@ namespace leveldb { -static int TargetFileSize(const Options* options) { +static size_t TargetFileSize(const Options* options) { return options->max_file_size; } |