Skip to content

Commit e719881

Browse files
authored
Compliance: reduce warnings (#61)
* stop windows with smaller UL types complaining about 'warning: left shift count >= width of type' * stop cmake 3.31 complaing about 'Compatibility with CMake < 3.10 will be removed from a future version'
1 parent 33cb70d commit e719881

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.9)
1+
cmake_minimum_required(VERSION 3.10)
22

33
project(xor_singleheader VERSION 1.1.0 LANGUAGES C)
44

include/binaryfusefilter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ static inline uint32_t binary_fuse8_hash(int index, uint64_t hash,
168168
uint64_t h = binary_fuse_mulhi(hash, filter->SegmentCountLength);
169169
h += index * filter->SegmentLength;
170170
// keep the lower 36 bits
171-
uint64_t hh = hash & ((1UL << 36) - 1);
171+
uint64_t hh = hash & ((1ULL << 36) - 1);
172172
// index 0: right shift by 36; index 1: right shift by 18; index 2: no shift
173173
h ^= (size_t)((hh >> (36 - 18 * index)) & filter->SegmentLengthMask);
174174
return h;
@@ -486,7 +486,7 @@ static inline uint32_t binary_fuse16_hash(int index, uint64_t hash,
486486
uint64_t h = binary_fuse_mulhi(hash, filter->SegmentCountLength);
487487
h += index * filter->SegmentLength;
488488
// keep the lower 36 bits
489-
uint64_t hh = hash & ((1UL << 36) - 1);
489+
uint64_t hh = hash & ((1ULL << 36) - 1);
490490
// index 0: right shift by 36; index 1: right shift by 18; index 2: no shift
491491
h ^= (size_t)((hh >> (36 - 18 * index)) & filter->SegmentLengthMask);
492492
return h;

0 commit comments

Comments
 (0)