suppress type-limit warning issued by some compilers by making var signed

Used to happen with older gcc giving:

"rlc_am.cc:1791:22: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]"
This commit is contained in:
Andre Puschmann 2019-08-05 15:05:43 +02:00
parent a9bea7e30c
commit d9577f0e1e
2 changed files with 2 additions and 2 deletions

View File

@ -222,7 +222,7 @@ private:
void handle_data_pdu(uint8_t *payload, uint32_t nof_bytes, rlc_amd_pdu_header_t &header);
void handle_data_pdu_segment(uint8_t *payload, uint32_t nof_bytes, rlc_amd_pdu_header_t &header);
void reassemble_rx_sdus();
bool inside_rx_window(uint16_t sn);
bool inside_rx_window(const int16_t sn);
void debug_state();
void print_rx_segments();
bool add_segment_and_check(rlc_amd_rx_pdu_segments_t *pdu, rlc_amd_rx_pdu_t *segment);

View File

@ -1782,7 +1782,7 @@ bool rlc_am::rlc_am_rx::add_segment_and_check(rlc_amd_rx_pdu_segments_t *pdu, rl
return true;
}
bool rlc_am::rlc_am_rx::inside_rx_window(uint16_t sn)
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))