提交 832271f6 编写于 作者: Y Yueh-Hsuan Chiang

Fixed a compile warning in db_stress in NDEBUG mode.

Summary: Fixed a compile warning in db_stress in NDEBUG mode.

Test Plan: make OPT=-DNDEBUG db_stress

Reviewers: sdong, anthony

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D39213
上级 dc9d70de
......@@ -845,6 +845,7 @@ class DbStressListener : public EventListener {
}
void VerifyFileDir(const std::string& file_dir) {
#ifndef NDEBUG
if (db_name_ == file_dir) {
return;
}
......@@ -854,17 +855,21 @@ class DbStressListener : public EventListener {
}
}
assert(false);
#endif // !NDEBUG
}
void VerifyFileName(const std::string& file_name) {
#ifndef NDEBUG
uint64_t file_number;
FileType file_type;
bool result = ParseFileName(file_name, &file_number, &file_type);
assert(result);
assert(file_type == kTableFile);
#endif // !NDEBUG
}
void VerifyFilePath(const std::string& file_path) {
#ifndef NDEBUG
size_t pos = file_path.find_last_of("/");
if (pos == std::string::npos) {
VerifyFileName(file_path);
......@@ -874,6 +879,7 @@ class DbStressListener : public EventListener {
}
VerifyFileName(file_path.substr(pos));
}
#endif // !NDEBUG
}
#endif // !ROCKSDB_LITE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册