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.
This commit is contained in:
Andre Puschmann 2019-09-10 09:52:08 +02:00
parent 513c7b12e3
commit 8da610d68b
1 changed files with 2 additions and 4 deletions

View File

@ -1784,11 +1784,9 @@ 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{
} else {
return false;
}
}