summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authoryangwei <[email protected]>2024-08-07 13:34:56 +0800
committerluwenpeng <[email protected]>2024-08-12 15:48:37 +0800
commit6bb5c44ee39d920cd6e3da7fab52a1a1cce548ba (patch)
treead04ddf2258e17e8e0d2d395602670493daf6208 /deps
parentf1b3928c7093dafb553ef51f49db58659525e502 (diff)
🐞 fix(warning as error): fix unused parameter warning
Diffstat (limited to 'deps')
-rw-r--r--deps/dablooms/murmur.cpp15
-rw-r--r--deps/rbtree/rbtree.cpp4
2 files changed, 18 insertions, 1 deletions
diff --git a/deps/dablooms/murmur.cpp b/deps/dablooms/murmur.cpp
index a36c5fa..83baeb4 100644
--- a/deps/dablooms/murmur.cpp
+++ b/deps/dablooms/murmur.cpp
@@ -92,37 +92,50 @@ void MurmurHash3_x64_128(const void *key, const int len, const uint32_t seed, vo
{
case 15:
k2 ^= ((uint64_t)tail[14]) << 48;
+ [[fallthrough]];
case 14:
k2 ^= ((uint64_t)tail[13]) << 40;
+ [[fallthrough]];
case 13:
k2 ^= ((uint64_t)tail[12]) << 32;
+ [[fallthrough]];
case 12:
k2 ^= ((uint64_t)tail[11]) << 24;
+ [[fallthrough]];
case 11:
k2 ^= ((uint64_t)tail[10]) << 16;
+ [[fallthrough]];
case 10:
k2 ^= ((uint64_t)tail[9]) << 8;
+ [[fallthrough]];
case 9:
k2 ^= ((uint64_t)tail[8]) << 0;
k2 *= c2;
k2 = ROTL64(k2, 33);
k2 *= c1;
h2 ^= k2;
-
+ [[fallthrough]];
case 8:
k1 ^= ((uint64_t)tail[7]) << 56;
+ [[fallthrough]];
case 7:
k1 ^= ((uint64_t)tail[6]) << 48;
+ [[fallthrough]];
case 6:
k1 ^= ((uint64_t)tail[5]) << 40;
+ [[fallthrough]];
case 5:
k1 ^= ((uint64_t)tail[4]) << 32;
+ [[fallthrough]];
case 4:
k1 ^= ((uint64_t)tail[3]) << 24;
+ [[fallthrough]];
case 3:
k1 ^= ((uint64_t)tail[2]) << 16;
+ [[fallthrough]];
case 2:
k1 ^= ((uint64_t)tail[1]) << 8;
+ [[fallthrough]];
case 1:
k1 ^= ((uint64_t)tail[0]) << 0;
k1 *= c1;
diff --git a/deps/rbtree/rbtree.cpp b/deps/rbtree/rbtree.cpp
index d648a94..2365dcd 100644
--- a/deps/rbtree/rbtree.cpp
+++ b/deps/rbtree/rbtree.cpp
@@ -442,11 +442,15 @@ void __rb_erase_color(struct rb_node *parent, struct rb_root *root,
* We use dummy augmented callbacks here, and have the compiler optimize them
* out of the rb_insert_color() and rb_erase() function definitions.
*/
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-parameter"
static inline void dummy_propagate(struct rb_node *node, struct rb_node *stop) {}
static inline void dummy_copy(struct rb_node *old, struct rb_node *new_node) {}
static inline void dummy_rotate(struct rb_node *old, struct rb_node *new_node) {}
+#pragma GCC diagnostic pop
+
static const struct rb_augment_callbacks dummy_callbacks = {
.propagate = dummy_propagate,
.copy = dummy_copy,