Skip to content

Commit fceb805

Browse files
committed
Merge #10: Clean up compile-time warnings (gcc 7.1)
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
2 parents d4c268a + 0ec2a34 commit fceb805

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

db/memtable.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void MemTable::Add(SequenceNumber s, ValueType type,
101101
p += 8;
102102
p = EncodeVarint32(p, val_size);
103103
memcpy(p, value.data(), val_size);
104-
assert((p + val_size) - buf == encoded_len);
104+
assert(p + val_size == buf + encoded_len);
105105
table_.Insert(buf);
106106
}
107107

db/version_set.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
namespace leveldb {
2222

23-
static int TargetFileSize(const Options* options) {
23+
static size_t TargetFileSize(const Options* options) {
2424
return options->max_file_size;
2525
}
2626

util/logging.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ bool ConsumeDecimalNumber(Slice* in, uint64_t* val) {
4949
uint64_t v = 0;
5050
int digits = 0;
5151
while (!in->empty()) {
52-
char c = (*in)[0];
52+
unsigned char c = (*in)[0];
5353
if (c >= '0' && c <= '9') {
5454
++digits;
5555
const int delta = (c - '0');

0 commit comments

Comments
 (0)