From 5c8923123a97bccadca5b00eda7a9c8fdf663551 Mon Sep 17 00:00:00 2001 From: faluco Date: Thu, 11 Feb 2021 11:25:08 +0100 Subject: [PATCH] Misc compilation fixes from the fapi repo. --- lib/src/phy/phch/test/pdcch_nr_test.c | 2 +- lib/src/phy/phch/test/pucch_test.c | 4 ++-- srsenb/test/mac/sched_ue_ded_test_suite.cc | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/src/phy/phch/test/pdcch_nr_test.c b/lib/src/phy/phch/test/pdcch_nr_test.c index 5bf83c40f..2d1b8ab1b 100644 --- a/lib/src/phy/phch/test/pdcch_nr_test.c +++ b/lib/src/phy/phch/test/pdcch_nr_test.c @@ -220,7 +220,7 @@ int main(int argc, char** argv) printf("+--------+--------+--------+--------+\n"); for (uint32_t i = 0; i < SRSLTE_SEARCH_SPACE_NOF_AGGREGATION_LEVELS_NR; i++) { if (enc_time[i].count > 0 && dec_time[i].count) { - printf("| %6d | %6ld | %6.1f | %6.1f |\n", + printf("| %6" PRIu32 "| %6" PRIu64 " | %6.1f | %6.1f |\n", i, enc_time[i].count, (double)enc_time[i].time_us / (double)enc_time[i].count, diff --git a/lib/src/phy/phch/test/pucch_test.c b/lib/src/phy/phch/test/pucch_test.c index 32b0f16d8..15c080817 100644 --- a/lib/src/phy/phch/test/pucch_test.c +++ b/lib/src/phy/phch/test/pucch_test.c @@ -300,8 +300,8 @@ int main(int argc, char** argv) goto quit; } - INFO("format %d, n_pucch: %d, ncs: %d, d: %d, t_encode=%ld us, t_decode=%ld us, EPRE=%+.1f dBfs, RSRP=%+.1f " - "dBfs, SNR=%+.1f dBfs", + INFO("format %d, n_pucch: %d, ncs: %d, d: %d, t_encode=%" PRIu64 " us, t_decode=%" PRIu64 + " us, EPRE=%+.1f dBfs, RSRP=%+.1f dBfs, SNR=%+.1f dBfs\n", format, n_pucch, ncs, diff --git a/srsenb/test/mac/sched_ue_ded_test_suite.cc b/srsenb/test/mac/sched_ue_ded_test_suite.cc index 443233f02..a1da1acff 100644 --- a/srsenb/test/mac/sched_ue_ded_test_suite.cc +++ b/srsenb/test/mac/sched_ue_ded_test_suite.cc @@ -68,7 +68,7 @@ int test_pdsch_grant(const sim_enb_ctxt_t& enb_ctxt, // TEST: Check if CC is configured and active CONDERROR(cc_cfg == nullptr or not cc_cfg->active, "PDSCH allocation for disabled or unavailable cc"); - CONDERROR(pdsch.dci.ue_cc_idx != std::distance(&ue_ctxt.ue_cfg.supported_cc_list.front(), cc_cfg), + CONDERROR(pdsch.dci.ue_cc_idx != (uint32_t)std::distance(&ue_ctxt.ue_cfg.supported_cc_list.front(), cc_cfg), "Inconsistent enb_cc_idx -> ue_cc_idx mapping"); // TEST: DCI is consistent with current UE DL harq state @@ -169,8 +169,7 @@ int test_ul_sched_result(const sim_enb_ctxt_t& enb_ctxt, const sf_output_res_t& bool h_inactive = (not h.active) or (phich_ack or last_retx); // TEST: Already active UL HARQs have to receive PHICH - CONDERROR( - h.active and phich_ptr == nullptr, "PHICH not received for rnti=0x%x active UL HARQ pid=%d", rnti, pid); + CONDERROR(h.active and phich_ptr == nullptr, "PHICH not received for rnti=0x%x active UL HARQ pid=%d", rnti, pid); CONDERROR(not h.active and phich_ptr != nullptr, "PHICH for rnti=0x%x corresponds to inactive UL HARQ pid=%d", rnti,