Skip to content

Commit

Permalink
lib/bloom: Fix a -Wconversion warning in OstreeBloom
Browse files Browse the repository at this point in the history
Compiling with -Wconversion warns on this line, as the conversion from
guint64 to guint8 is implicit (but safe: there is no bug here, since the
implicit cast is applied after the modulus arithmetic).

Make the cast explicit to silence -Wconversion.

Signed-off-by: Philip Withnall <[email protected]>
  • Loading branch information
pwithnall committed Sep 30, 2017
1 parent fddad99 commit a289944
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libostree/ostree-bloom.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ ostree_bloom_set_bit (OstreeBloom *bloom,
{
g_assert (bloom->is_mutable);
g_assert (idx / 8 < bloom->n_bytes);
bloom->mutable_bytes[idx / 8] |= (1 << (idx % 8));
bloom->mutable_bytes[idx / 8] |= (guint8) (1 << (idx % 8));
}

/**
Expand Down

0 comments on commit a289944

Please sign in to comment.