Skip to content

Commit

Permalink
Merge PIVX-Project#10: Clean up compile-time warnings (gcc 7.1)
Browse files Browse the repository at this point in the history
0ec2a34 Clean up compile-time warnings (gcc 7.1) (Matt Corallo)

Pull request description:

  * max_file_size was already a size_t, so return that.
  * ecx was somehow being listed as used-uninitialized

Tree-SHA512: 6aeb9d6ce343d27c00338a379e6f359a6591e06fda978204133b9f81d817d99d4e4fcb7c851cf366276ef0171cfe77fa5765d836014dd6f213653ac53420d121
  • Loading branch information
sipa committed Jul 31, 2017
2 parents d4c268a + 0ec2a34 commit fceb805
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 fceb805

Please sign in to comment.