Skip to content

Commit

Permalink
Clean up compile-time warnings (gcc 7.1)
Browse files Browse the repository at this point in the history
* max_file_size was already a size_t, so return that.
  • Loading branch information
TheBlueMatt committed Jul 23, 2017
1 parent d4c268a commit 0ec2a34
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion db/memtable.cc
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion db/version_set.cc
Expand Up @@ -20,7 +20,7 @@

namespace leveldb {

static int TargetFileSize(const Options* options) {
static size_t TargetFileSize(const Options* options) {
return options->max_file_size;
}

Expand Down
2 changes: 1 addition & 1 deletion util/logging.cc
Expand Up @@ -49,7 +49,7 @@ bool ConsumeDecimalNumber(Slice* in, uint64_t* val) {
uint64_t v = 0;
int digits = 0;
while (!in->empty()) {
char c = (*in)[0];
unsigned char c = (*in)[0];
if (c >= '0' && c <= '9') {
++digits;
const int delta = (c - '0');
Expand Down

0 comments on commit 0ec2a34

Please sign in to comment.