From ab98577deb087faa826abee4f7333eb36cfb7691 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 4 Jul 2020 12:50:34 +0200 Subject: [PATCH] Fix warning --- m-bitset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m-bitset.h b/m-bitset.h index f5947b5d..5fa91e3c 100644 --- a/m-bitset.h +++ b/m-bitset.h @@ -174,7 +174,7 @@ bitset_set_at(bitset_t v, size_t i, bool x) const size_t index = i % BITSET_LIMB_BIT; // This is a branchless version as x can only be 0 or 1 with only one variable shift. const bitset_limb mask = ((bitset_limb)1)<ptr[offset] = (v->ptr[offset] & ~mask) | (mask & (-(bitset_limb)x)); + v->ptr[offset] = (v->ptr[offset] & ~mask) | (mask & (0-(bitset_limb)x)); BITSETI_CONTRACT (v); }