diff options
author | Luca Deri <deri@ntop.org> | 2023-08-12 07:39:35 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2023-08-12 07:39:35 +0200 |
commit | 9a449543654ff3fd71d750206d8f06f85ff71c3b (patch) | |
tree | e93518da78f9dc61524afd93b10ffda993a24826 /src/lib/third_party | |
parent | fe634b8d55b58e7f63ddc38ac29d63592b1801e3 (diff) |
ARM compilation fix
Diffstat (limited to 'src/lib/third_party')
-rw-r--r-- | src/lib/third_party/include/binaryfusefilter.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/third_party/include/binaryfusefilter.h b/src/lib/third_party/include/binaryfusefilter.h index 4835f92ea..319e76f08 100644 --- a/src/lib/third_party/include/binaryfusefilter.h +++ b/src/lib/third_party/include/binaryfusefilter.h @@ -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; @@ -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; |