diff options
author | Jason Evans <jasone@canonware.com> | 2017-05-11 23:50:49 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2017-05-12 01:06:20 (GMT) |
commit | 81ef365622c52d9252f546061652b0b31513c0b7 (patch) | |
tree | fb480e8df79c52413ea22a64095345c8f24a6697 | |
parent | 11d2f39d96d1a1e4d35a438e184fa0785a2baf08 (diff) | |
download | jemalloc-81ef365622c52d9252f546061652b0b31513c0b7.zip jemalloc-81ef365622c52d9252f546061652b0b31513c0b7.tar.gz jemalloc-81ef365622c52d9252f546061652b0b31513c0b7.tar.bz2 |
Avoid compiler warnings on Windows.
-rw-r--r-- | include/jemalloc/internal/bitmap.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/jemalloc/internal/bitmap.h b/include/jemalloc/internal/bitmap.h index f6374e1..ac99029 100644 --- a/include/jemalloc/internal/bitmap.h +++ b/include/jemalloc/internal/bitmap.h @@ -249,8 +249,8 @@ bitmap_ffu(const bitmap_t *bitmap, const bitmap_info_t *binfo, size_t min_bit) { 1)); bitmap_t group = bitmap[binfo->levels[level].group_offset + (bit >> lg_bits_per_group)]; - unsigned group_nmask = ((min_bit > bit) ? (min_bit - bit) : 0) - >> (lg_bits_per_group - LG_BITMAP_GROUP_NBITS); + unsigned group_nmask = (unsigned)(((min_bit > bit) ? (min_bit - + bit) : 0) >> (lg_bits_per_group - LG_BITMAP_GROUP_NBITS)); assert(group_nmask <= BITMAP_GROUP_NBITS); bitmap_t group_mask = ~((1LU << group_nmask) - 1); bitmap_t group_masked = group & group_mask; @@ -265,7 +265,7 @@ bitmap_ffu(const bitmap_t *bitmap, const bitmap_info_t *binfo, size_t min_bit) { * next sibling. This will recurse at most once per * non-root level. */ - size_t sib_base = bit + (1U << lg_bits_per_group); + size_t sib_base = bit + (ZU(1) << lg_bits_per_group); assert(sib_base > min_bit); assert(sib_base > bit); if (sib_base >= binfo->nbits) { @@ -273,8 +273,8 @@ bitmap_ffu(const bitmap_t *bitmap, const bitmap_info_t *binfo, size_t min_bit) { } return bitmap_ffu(bitmap, binfo, sib_base); } - bit += (ffs_lu(group_masked) - 1) << (lg_bits_per_group - - LG_BITMAP_GROUP_NBITS); + bit += ((size_t)(ffs_lu(group_masked) - 1)) << + (lg_bits_per_group - LG_BITMAP_GROUP_NBITS); } assert(bit >= min_bit); assert(bit < binfo->nbits); |