Skip to content

Commit

Permalink
Fix compiler warnings in KQIR and RDB (apache#2303)
Browse files Browse the repository at this point in the history
Co-authored-by: Twice <[email protected]>
  • Loading branch information
raffertyyu and PragmaTwice authored May 11, 2024
1 parent 2337092 commit b2347f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/search/executors/filter_executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ struct QueryExprEvaluator {
return l > r;
case NumericCompareExpr::GET:
return l >= r;
default:
CHECK(false) << "unreachable";
__builtin_unreachable();
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/storage/rdb_ziplist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b2347f3

Please sign in to comment.