Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: bmqp protocol Wconv warns #257

Merged
merged 12 commits into from
May 13, 2024
9 changes: 4 additions & 5 deletions src/groups/bmq/bmqp/bmqp_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -4138,7 +4138,6 @@ inline SchemaWireId::SchemaWireId()
// PUBLIC MODIFIERS
inline void SchemaWireId::set(unsigned value)
{
// Include precondition check or adjust function signature?
d_value = static_cast<short unsigned int>(value);
}

Expand Down Expand Up @@ -4353,9 +4352,9 @@ inline AckHeader& AckHeader::setHeaderWords(int value)
BSLS_ASSERT_SAFE(value >= 0 &&
value <= (1 << k_HEADER_WORDS_NUM_BITS) - 1);

d_headerWordsAndPerMsgWords =
d_headerWordsAndPerMsgWords = static_cast<unsigned char>(
(d_headerWordsAndPerMsgWords & k_PER_MSG_WORDS_MASK) |
static_cast<unsigned char>(value << k_HEADER_WORDS_START_IDX);
static_cast<unsigned char>(value << k_HEADER_WORDS_START_IDX));
return *this;
}

Expand All @@ -4365,9 +4364,9 @@ inline AckHeader& AckHeader::setPerMessageWords(int value)
BSLS_ASSERT_SAFE(value >= 0 &&
value <= (1 << k_PER_MSG_WORDS_NUM_BITS) - 1);

d_headerWordsAndPerMsgWords =
d_headerWordsAndPerMsgWords = static_cast<unsigned char>(
(d_headerWordsAndPerMsgWords & k_HEADER_WORDS_MASK) |
static_cast<unsigned char>(value & k_PER_MSG_WORDS_MASK);
static_cast<unsigned char>(value & k_PER_MSG_WORDS_MASK));
return *this;
}

Expand Down
Loading