From 8774875e556267569b85881b966094fe9eaa84dc Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Fri, 29 Dec 2023 13:43:26 -0500 Subject: [PATCH 1/2] Fix -Wsuggest-override warnings from Clang --- snappy.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/snappy.cc b/snappy.cc index 6473123..62786a1 100644 --- a/snappy.cc +++ b/snappy.cc @@ -1695,16 +1695,16 @@ class SnappyIOVecReader : public Source { if (total_size > 0 && curr_size_remaining_ == 0) Advance(); } - ~SnappyIOVecReader() = default; + ~SnappyIOVecReader() override = default; - size_t Available() const { return total_size_remaining_; } + size_t Available() const override { return total_size_remaining_; } - const char* Peek(size_t* len) { + const char* Peek(size_t* len) override { *len = curr_size_remaining_; return curr_pos_; } - void Skip(size_t n) { + void Skip(size_t n) override { while (n >= curr_size_remaining_ && n > 0) { n -= curr_size_remaining_; Advance(); From 41a3ade229e925bc1abf59e49094c6d54bf0ff9c Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Mon, 18 Dec 2017 15:09:02 -0500 Subject: [PATCH 2/2] Silence -Wdeprecated warning on clang * definition of implicit copy constructor for 'SnappySinkAllocator' is deprecated because it has a user-declared destructor. --- snappy.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/snappy.cc b/snappy.cc index 62786a1..7fc19d1 100644 --- a/snappy.cc +++ b/snappy.cc @@ -2341,7 +2341,6 @@ bool SnappyScatteredWriter::SlowAppendFromSelf(size_t offset, class SnappySinkAllocator { public: explicit SnappySinkAllocator(Sink* dest) : dest_(dest) {} - ~SnappySinkAllocator() {} char* Allocate(int size) { Datablock block(new char[size], size);