From 784e62f98dcf0b1dbcf3dedc3ad4c26bac5fae7e Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Mon, 9 Dec 2013 16:44:47 -0800 Subject: [PATCH] Fix unused variable warning --- utilities/backupable/backupable_db.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utilities/backupable/backupable_db.cc b/utilities/backupable/backupable_db.cc index 3e87b02c5..498606045 100644 --- a/utilities/backupable/backupable_db.cc +++ b/utilities/backupable/backupable_db.cc @@ -273,7 +273,10 @@ Status BackupEngine::CreateNewBackup(DB* db, bool flush_before_backup) { uint64_t number; FileType type; bool ok = ParseFileName(live_files[i], &number, &type); - assert(ok); + if (!ok) { + assert(false); + return Status::Corruption("Can't parse file name. This is very bad"); + } // we should only get sst, manifest and current files here assert(type == kTableFile || type == kDescriptorFile ||