diff --git a/0007-fix-style-and-remove-unused-code.patch b/0007-fix-style-and-remove-unused-code.patch new file mode 100644 index 0000000000000000000000000000000000000000..e80a7bd2cd258d43db2fb4279d66713c90831ab8 --- /dev/null +++ b/0007-fix-style-and-remove-unused-code.patch @@ -0,0 +1,49 @@ +From 3ee04c5ceae6535e922521ed940411a0318fdd3b Mon Sep 17 00:00:00 2001 +From: lingbin +Date: Mon, 4 Sep 2017 16:10:38 +0800 +Subject: [PATCH] fix style and remove unused code + +--- + util/coding.cc | 10 ---------- + util/coding.h | 4 ++-- + 2 files changed, 2 insertions(+), 12 deletions(-) + +diff --git a/util/coding.cc b/util/coding.cc +index 21e3186..c37b24a 100644 +--- a/util/coding.cc ++++ b/util/coding.cc +@@ -169,16 +169,6 @@ bool GetVarint64(Slice* input, uint64_t* value) { + } + } + +-const char* GetLengthPrefixedSlice(const char* p, const char* limit, +- Slice* result) { +- uint32_t len; +- p = GetVarint32Ptr(p, limit, &len); +- if (p == NULL) return NULL; +- if (p + len > limit) return NULL; +- *result = Slice(p, len); +- return p + len; +-} +- + bool GetLengthPrefixedSlice(Slice* input, Slice* result) { + uint32_t len; + if (GetVarint32(input, &len) && +diff --git a/util/coding.h b/util/coding.h +index 3993c4a..8582d90 100644 +--- a/util/coding.h ++++ b/util/coding.h +@@ -35,8 +35,8 @@ extern bool GetLengthPrefixedSlice(Slice* input, Slice* result); + // in *v and return a pointer just past the parsed value, or return + // NULL on error. These routines only look at bytes in the range + // [p..limit-1] +-extern const char* GetVarint32Ptr(const char* p,const char* limit, uint32_t* v); +-extern const char* GetVarint64Ptr(const char* p,const char* limit, uint64_t* v); ++extern const char* GetVarint32Ptr(const char* p, const char* limit, uint32_t* v); ++extern const char* GetVarint64Ptr(const char* p, const char* limit, uint64_t* v); + + // Returns the length of the varint32 or varint64 encoding of "v" + extern int VarintLength(uint64_t v); +-- +2.40.0.windows.1 + diff --git a/leveldb.spec b/leveldb.spec index 55dd9542249f62b8c46ed97c8b0ea7d18e28dc44..bb325d6cb4d7b9a30b2b7d88cec27327cf213046 100644 --- a/leveldb.spec +++ b/leveldb.spec @@ -1,6 +1,6 @@ Name: leveldb Version: 1.20 -Release: 6 +Release: 7 Summary: A key/value database library License: BSD URL: https://github.com/google/leveldb @@ -12,6 +12,7 @@ Patch0003: 0003-allow-Get-calls-to-avoid-copies-into-std-string.patch Patch0004: 0004-bloom_test-failure-on-big-endian-archs.patch Patch0005: 0005-broken-db-fix-assertion-in-leveldb-InternalKey-Encod.patch Patch0006: 0006-leveldb-Fix-alignment-code-in-SSE4.2-optimized-CRC32.patch +Patch0007: 0007-fix-style-and-remove-unused-code.patch BuildRequires: make gcc-c++ snappy-devel @@ -73,6 +74,9 @@ make -j1 check %{_libdir}/pkgconfig/leveldb.pc %changelog +* Fri Jun 30 2023 yaoguangzhong - 1.20-7 +- fix style and remove unused code + * Tue Apr 25 2023 yaoguangzhong - 1.20-6 - fix alignment code in SSE4.2-optimized CRC32C