This is an automated email from the ASF dual-hosted git repository.

maplefu pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new b2347f31 Fix compiler warnings in KQIR and RDB (#2303)
b2347f31 is described below

commit b2347f31ef39f982067f41cd0310f7c802cc787a
Author: raffertyyu <[email protected]>
AuthorDate: Sat May 11 14:25:12 2024 +0800

    Fix compiler warnings in KQIR and RDB (#2303)
    
    Co-authored-by: Twice <[email protected]>
---
 src/search/executors/filter_executor.h | 3 +++
 src/storage/rdb_ziplist.cc             | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/search/executors/filter_executor.h 
b/src/search/executors/filter_executor.h
index 83d45377..6820ae58 100644
--- a/src/search/executors/filter_executor.h
+++ b/src/search/executors/filter_executor.h
@@ -100,6 +100,9 @@ struct QueryExprEvaluator {
         return l > r;
       case NumericCompareExpr::GET:
         return l >= r;
+      default:
+        CHECK(false) << "unreachable";
+        __builtin_unreachable();
     }
   }
 };
diff --git a/src/storage/rdb_ziplist.cc b/src/storage/rdb_ziplist.cc
index 98f764b1..b51dc8dd 100644
--- a/src/storage/rdb_ziplist.cc
+++ b/src/storage/rdb_ziplist.cc
@@ -196,7 +196,7 @@ uint32_t ZipList::ZipStoreEntryEncoding(unsigned char *p, 
size_t zl_size, unsign
     buf[3] = (rawlen >> 8) & 0xff;
     buf[4] = rawlen & 0xff;
   }
-  assert(zl_size >= zlHeaderSize + len);
+  assert(zl_size >= static_cast<size_t>(zlHeaderSize) + len);
   /* Store this length at p. */
   memcpy(p, buf, len);
   return len;

Reply via email to