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]"
master
Andre Puschmann 5 years ago
parent a9bea7e30c
commit d9577f0e1e

@ -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);

@ -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))

Loading…
Cancel
Save