diff --git a/src/libostree/ostree-bloom.c b/src/libostree/ostree-bloom.c index 6b42d97a78..8defb17673 100644 --- a/src/libostree/ostree-bloom.c +++ b/src/libostree/ostree-bloom.c @@ -273,11 +273,11 @@ ostree_bloom_maybe_contains (OstreeBloom *bloom, for (i = 0; i < bloom->k; i++) { - gsize idx; + guint64 idx; idx = bloom->hash_func (element, i); - if (!ostree_bloom_get_bit (bloom, idx % (bloom->n_bytes * 8))) + if (!ostree_bloom_get_bit (bloom, (gsize) (idx % (bloom->n_bytes * 8)))) return FALSE; /* definitely not in the set */ } @@ -337,8 +337,8 @@ ostree_bloom_add_element (OstreeBloom *bloom, for (i = 0; i < bloom->k; i++) { - gsize idx = bloom->hash_func (element, i); - ostree_bloom_set_bit (bloom, idx % (bloom->n_bytes * 8)); + guint64 idx = bloom->hash_func (element, i); + ostree_bloom_set_bit (bloom, (gsize) (idx % (bloom->n_bytes * 8))); } }