mapleFU commented on code in PR #2303:
URL: https://github.com/apache/kvrocks/pull/2303#discussion_r1593651356
##########
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);
Review Comment:
Would `DCHECK` better here?
##########
src/search/executors/filter_executor.h:
##########
@@ -100,6 +100,9 @@ struct QueryExprEvaluator {
return l > r;
case NumericCompareExpr::GET:
return l >= r;
+ default:
+ assert(false);
+ return false;
Review Comment:
Should we elaborate all branches rather than a unreachable "default"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]