Skip to content

Commit

Permalink
ARM compilation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaderi committed Aug 12, 2023
1 parent fe634b8 commit 9a44954
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/third_party/include/binaryfusefilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static inline uint32_t binary_fuse8_hash(int index, uint64_t hash,
uint64_t h = binary_fuse_mulhi(hash, filter->SegmentCountLength);
h += index * filter->SegmentLength;
// keep the lower 36 bits
uint64_t hh = hash & ((1UL << 36) - 1);
uint64_t hh = hash & ((((uint64_t)1UL( << 36) - 1);
// index 0: right shift by 36; index 1: right shift by 18; index 2: no shift
h ^= (size_t)((hh >> (36 - 18 * index)) & filter->SegmentLengthMask);
return h;
Expand Down Expand Up @@ -469,7 +469,7 @@ static inline uint32_t binary_fuse16_hash(int index, uint64_t hash,
uint64_t h = binary_fuse_mulhi(hash, filter->SegmentCountLength);
h += index * filter->SegmentLength;
// keep the lower 36 bits
uint64_t hh = hash & ((1UL << 36) - 1);
uint64_t hh = hash & ((((uint64_t)1UL) << 36) - 1);
// index 0: right shift by 36; index 1: right shift by 18; index 2: no shift
h ^= (size_t)((hh >> (36 - 18 * index)) & filter->SegmentLengthMask);
return h;
Expand Down

1 comment on commit 9a44954

@dxloc
Copy link

@dxloc dxloc commented on 9a44954 Aug 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 155: should be

uint64_t hh = hash & (((uint64_t)1UL << 36) - 1);

Please sign in to comment.