Fix -Wnon-virtual-dtor errors

Summary: This breaks mongo+rocks build https://mci.10gen.com/task_log_raw/rocksdb_ubuntu1404_rocksdb_c6e8e3d868660dc66b3bbd438cdc135df6356c5a_14_11_10_21_36_10_compile_ubuntu1404_rocksdb/0?type=T

Test Plan: m check + -Wnon-virtual-dtor

Reviewers: sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D28653
This commit is contained in:
Igor Canadi 2014-11-10 17:39:38 -05:00
parent 746252197b
commit c7ee9c3ab7
4 changed files with 5 additions and 4 deletions

View File

@ -69,7 +69,7 @@ install:
@[ ! -e $(SHARED) ] || install -C -m 644 $(SHARED) $(INSTALL_PATH)/lib
#-------------------------------------------------
WARNING_FLAGS = -Wall -Werror -Wsign-compare -Wshadow
WARNING_FLAGS = -Wall -Werror -Wsign-compare -Wshadow -Wnon-virtual-dtor
CFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CCFLAGS) $(OPT)
CXXFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) -Woverloaded-virtual

View File

@ -38,9 +38,9 @@ class WalManager {
env_(db_options.env),
purge_wal_files_last_run_(0) {}
virtual Status GetSortedWalFiles(VectorLogPtr& files);
Status GetSortedWalFiles(VectorLogPtr& files);
virtual Status GetUpdatesSince(
Status GetUpdatesSince(
SequenceNumber seq_number, std::unique_ptr<TransactionLogIterator>* iter,
const TransactionLogIterator::ReadOptions& read_options,
VersionSet* version_set);

View File

@ -58,6 +58,7 @@ class EventListener {
const std::string& file_path,
bool triggered_writes_slowdown,
bool triggered_writes_stop) {}
virtual ~EventListener() {}
};
} // namespace rocksdb

View File

@ -69,7 +69,7 @@ class Arena {
// If an allocation is too big, we'll allocate an irregular block with the
// same size of that allocation.
virtual size_t IrregularBlockNum() const { return irregular_block_num; }
size_t IrregularBlockNum() const { return irregular_block_num; }
size_t BlockSize() const { return kBlockSize; }