Get DragonDB to compile with clang.

While at it, fix some compile warnings, 2 of them are actual bugs
(missing virtual d'tor).

Signed-off-by: chakaz <chakaz@chakaz>
This commit is contained in:
chakaz 2023-03-17 23:37:50 +02:00 committed by Roman Gershman
parent bb78c6eae3
commit 9add31e20f
11 changed files with 10 additions and 15 deletions

View file

@ -200,7 +200,7 @@ class DecompressImpl {
public:
DecompressImpl() : uncompressed_mem_buf_{16_KB} {
}
~DecompressImpl() {
virtual ~DecompressImpl() {
}
virtual io::Result<base::IoBuf*> Decompress(std::string_view str) = 0;
@ -1955,7 +1955,6 @@ error_code RdbLoaderBase::HandleCompressedBlob(int op_type) {
// Decompress blob and switch membuf pointer
// Last type in the compressed blob is RDB_OPCODE_COMPRESSED_BLOB_END
// in which we will switch back to the origin membuf (HandleCompressedBlobFinish)
string_view uncompressed_blob;
SET_OR_RETURN(decompress_impl_->Decompress(res), mem_buf_);
return kOk;