Skip to content

Commit

Permalink
Fix[mqbs_filestoreprotocol.h]: -Wconversion warnings (bloomberg#422)
Browse files Browse the repository at this point in the history
* Fix[mqbs_filestoreprotocol.h]: -Wconversion warnings

Signed-off-by: Evgeny Malygin <emalygin@bloomberg.net>

* Update mqbs_filestoreprotocol.h

Signed-off-by: Evgeny Malygin <emalygin@bloomberg.net>

---------

Signed-off-by: Evgeny Malygin <emalygin@bloomberg.net>
  • Loading branch information
678098 authored and alexander-e1off committed Oct 24, 2024
1 parent 68124e0 commit aa222bf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/groups/mqb/mqbs/mqbs_filestoreprotocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -2646,11 +2646,12 @@ inline RecordHeader& MessageRecord::header()

inline MessageRecord& MessageRecord::setRefCount(unsigned int value)
{
const bsl::uint16_t lowBits = value & k_REFCOUNT_LOW_BITS_MASK;
const bsl::uint16_t lowBits = static_cast<bsl::uint16_t>(
value & k_REFCOUNT_LOW_BITS_MASK);
d_header.setFlags(lowBits);

value >>= k_REFCOUNT_NUM_LOW_BITS;
d_refCountHighBits = value;
d_refCountHighBits = static_cast<unsigned char>(value);

BSLS_ASSERT_SAFE((value & ~k_REFCOUNT_HIGH_BITS_MASK) == 0);

Expand Down

0 comments on commit aa222bf

Please sign in to comment.