diff --git a/lib/src/phy/fec/ldpc/ldpc_dec_c_avx2long_flood.c b/lib/src/phy/fec/ldpc/ldpc_dec_c_avx2long_flood.c index 1fddbcd66..0d9956b69 100644 --- a/lib/src/phy/fec/ldpc/ldpc_dec_c_avx2long_flood.c +++ b/lib/src/phy/fec/ldpc/ldpc_dec_c_avx2long_flood.c @@ -147,7 +147,7 @@ void* create_ldpc_dec_c_avx2long_flood(uint8_t bgN, uint8_t bgM, uint16_t ls, fl return NULL; } - if ((vp->check_to_var = srsran_vec_malloc((hrr + 1) * bgM * n_subnodes * sizeof(__m256i))) == NULL) { + if ((vp->check_to_var = srsran_vec_malloc((long)(hrr + 1) * bgM * n_subnodes * sizeof(__m256i))) == NULL) { free(vp->soft_bits); free(vp->llrs); free(vp); @@ -205,7 +205,7 @@ void* create_ldpc_dec_c_avx2long_flood(uint8_t bgN, uint8_t bgM, uint16_t ls, fl return NULL; } - if ((vp->rotated_v2c = srsran_vec_malloc((hrr + 1) * n_subnodes * sizeof(__m256i))) == NULL) { + if ((vp->rotated_v2c = srsran_vec_malloc((long)(hrr + 1) * n_subnodes * sizeof(__m256i))) == NULL) { free(vp->min_ix_epi8); free(vp->prod_v2c_epi8); free(vp->mins_v2c_epi8); diff --git a/lib/src/phy/fec/polar/polar_chanalloc.c b/lib/src/phy/fec/polar/polar_chanalloc.c index 301c9cd58..177e9f92f 100644 --- a/lib/src/phy/fec/polar/polar_chanalloc.c +++ b/lib/src/phy/fec/polar/polar_chanalloc.c @@ -82,7 +82,7 @@ void srsran_polar_chanalloc_rx(const uint8_t* output_decoder, uint16_t i_o = 0; uint16_t iPC = 0; uint16_t iK = 0; - for (uint16_t iKPC = 0; iKPC < K + nPC; iKPC++) { + for (uint16_t iKPC = 0; iKPC < K + (uint16_t)nPC; iKPC++) { i_o = K_set[iKPC]; // includes parity bits if (i_o == PC_set[iPC]) { // skip iPC = iPC + 1;