Skip to content

Commit

Permalink
Fix code scanning alert no. 12: Multiplication result converted to la…
Browse files Browse the repository at this point in the history
…rger type (#2676)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
lucaderi and github-advanced-security[bot] authored Jan 13, 2025
1 parent 6b686be commit 082a9ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/third_party/include/binaryfusefilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ static inline binary_hashes_t binary_fuse16_hash_batch(uint64_t hash,
static inline uint32_t binary_fuse16_hash(int index, uint64_t hash,
const binary_fuse16_t *filter) {
uint64_t h = binary_fuse_mulhi(hash, filter->SegmentCountLength);
h += index * filter->SegmentLength;
h += (uint64_t)index * filter->SegmentLength;
// keep the lower 36 bits
uint64_t hh = hash & ((1ULL << 36) - 1);
// index 0: right shift by 36; index 1: right shift by 18; index 2: no shift
Expand Down

0 comments on commit 082a9ad

Please sign in to comment.