From d9577f0e1e21a5e75deec6f058e669d551633ca3 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Mon, 5 Aug 2019 15:05:43 +0200 Subject: [PATCH] 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]" --- lib/include/srslte/upper/rlc_am.h | 2 +- lib/src/upper/rlc_am.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/include/srslte/upper/rlc_am.h b/lib/include/srslte/upper/rlc_am.h index be7e223e3..48ca8f96a 100644 --- a/lib/include/srslte/upper/rlc_am.h +++ b/lib/include/srslte/upper/rlc_am.h @@ -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); diff --git a/lib/src/upper/rlc_am.cc b/lib/src/upper/rlc_am.cc index 4741e7802..0c2a9616e 100644 --- a/lib/src/upper/rlc_am.cc +++ b/lib/src/upper/rlc_am.cc @@ -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))