fix gcc (<= 5) warning with type-limits by casting vr_r to a signed type

this warning is a bit annoying as it is really safe to do
that kind of comparision, it's just that for vr_r==0, any other
unsigned number is >= 0.
master
Andre Puschmann 5 years ago
parent 513c7b12e3
commit 8da610d68b

@ -1784,9 +1784,7 @@ bool rlc_am::rlc_am_rx::add_segment_and_check(rlc_amd_rx_pdu_segments_t *pdu, rl
bool rlc_am::rlc_am_rx::inside_rx_window(const int16_t sn)
{
if(RX_MOD_BASE(sn) >= RX_MOD_BASE(vr_r) &&
RX_MOD_BASE(sn) < RX_MOD_BASE(vr_mr))
{
if (RX_MOD_BASE(sn) >= RX_MOD_BASE(static_cast<int16_t>(vr_r)) && RX_MOD_BASE(sn) < RX_MOD_BASE(vr_mr)) {
return true;
} else {
return false;

Loading…
Cancel
Save