Skip to content

Commit 784e62f

Browse files
committed
Fix unused variable warning
1 parent fb9fce4 commit 784e62f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

utilities/backupable/backupable_db.cc

+4-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,10 @@ Status BackupEngine::CreateNewBackup(DB* db, bool flush_before_backup) {
273273
uint64_t number;
274274
FileType type;
275275
bool ok = ParseFileName(live_files[i], &number, &type);
276-
assert(ok);
276+
if (!ok) {
277+
assert(false);
278+
return Status::Corruption("Can't parse file name. This is very bad");
279+
}
277280
// we should only get sst, manifest and current files here
278281
assert(type == kTableFile ||
279282
type == kDescriptorFile ||

0 commit comments

Comments
 (0)