Fix compile warning
This commit is contained in:
parent
0754d4cb3b
commit
f780f35b06
@ -685,12 +685,12 @@ Status SpatialDB::Open(const SpatialDBOptions& options, const std::string& name,
|
|||||||
Iterator* iter = base_db->NewIterator(ReadOptions(), handles[0]);
|
Iterator* iter = base_db->NewIterator(ReadOptions(), handles[0]);
|
||||||
iter->SeekToLast();
|
iter->SeekToLast();
|
||||||
if (iter->Valid()) {
|
if (iter->Valid()) {
|
||||||
uint64_t last_id;
|
uint64_t last_id = 0;
|
||||||
bool ok = GetFixed64BigEndian(iter->key(), &last_id);
|
if (!GetFixed64BigEndian(iter->key(), &last_id)) {
|
||||||
if (!ok) {
|
|
||||||
s = Status::Corruption("Invalid key in data column family");
|
s = Status::Corruption("Invalid key in data column family");
|
||||||
|
} else {
|
||||||
|
next_id = last_id + 1;
|
||||||
}
|
}
|
||||||
next_id = last_id + 1;
|
|
||||||
} else {
|
} else {
|
||||||
next_id = 1;
|
next_id = 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user