diff --git a/lib/test/common/network_utils_test.cc b/lib/test/common/network_utils_test.cc index 07624385c..2a9290777 100644 --- a/lib/test/common/network_utils_test.cc +++ b/lib/test/common/network_utils_test.cc @@ -23,13 +23,15 @@ struct rx_thread_tester { std::thread t; rx_thread_tester() : - task_queue(task_sched.make_task_queue()), t([this]() { + task_queue(task_sched.make_task_queue()), + t([this]() { stop_token.store(false); while (not stop_token.load(std::memory_order_relaxed)) { task_sched.run_pending_tasks(); std::this_thread::sleep_for(std::chrono::microseconds(100)); } - }) + }), + stop_token(false) {} ~rx_thread_tester() { diff --git a/lib/test/phy/phy_dl_nr_test.c b/lib/test/phy/phy_dl_nr_test.c index a5f61aacd..5e17b0ff1 100644 --- a/lib/test/phy/phy_dl_nr_test.c +++ b/lib/test/phy/phy_dl_nr_test.c @@ -266,7 +266,6 @@ int main(int argc, char** argv) if (srsran_ue_dl_nr_set_carrier(&ue_dl, &carrier)) { ERROR("Error setting SCH NR carrier"); goto clean_exit; - goto clean_exit; } srsran_dci_cfg_nr_t dci_cfg = {}; diff --git a/srsenb/hdr/phy/prach_worker.h b/srsenb/hdr/phy/prach_worker.h index de7042b59..9f3269cf0 100644 --- a/srsenb/hdr/phy/prach_worker.h +++ b/srsenb/hdr/phy/prach_worker.h @@ -34,7 +34,8 @@ class stack_interface_phy_lte; class prach_worker : srsran::thread { public: - prach_worker(uint32_t cc_idx_, srslog::basic_logger& logger) : buffer_pool(8), thread("PRACH_WORKER"), logger(logger) + prach_worker(uint32_t cc_idx_, srslog::basic_logger& logger) : + buffer_pool(8), thread("PRACH_WORKER"), logger(logger), running(false) { cc_idx = cc_idx_; } diff --git a/srsenb/src/phy/txrx.cc b/srsenb/src/phy/txrx.cc index 4ce1afa53..03f1f0935 100644 --- a/srsenb/src/phy/txrx.cc +++ b/srsenb/src/phy/txrx.cc @@ -34,7 +34,7 @@ using namespace std; namespace srsenb { -txrx::txrx(srslog::basic_logger& logger) : thread("TXRX"), logger(logger) +txrx::txrx(srslog::basic_logger& logger) : thread("TXRX"), logger(logger), running(false) { /* Do nothing */ } diff --git a/srsue/hdr/metrics_csv.h b/srsue/hdr/metrics_csv.h index f2d8ec729..e57500d5c 100644 --- a/srsue/hdr/metrics_csv.h +++ b/srsue/hdr/metrics_csv.h @@ -42,13 +42,13 @@ public: void stop(); private: - void set_metrics_helper(const srsran::rf_metrics_t rf, - const srsran::sys_metrics_t sys, - const phy_metrics_t phy, - const mac_metrics_t mac[SRSRAN_MAX_CARRIERS], - const rrc_metrics_t rrc, - const uint32_t cc, - const uint32_t r); + void set_metrics_helper(const srsran::rf_metrics_t& rf, + const srsran::sys_metrics_t& sys, + const phy_metrics_t& phy, + const mac_metrics_t mac[SRSRAN_MAX_CARRIERS], + const rrc_metrics_t& rrc, + const uint32_t cc, + const uint32_t r); std::string float_to_string(float f, int digits, bool add_semicolon = true); diff --git a/srsue/hdr/metrics_stdout.h b/srsue/hdr/metrics_stdout.h index 95285a64b..ecf58cdc2 100644 --- a/srsue/hdr/metrics_stdout.h +++ b/srsue/hdr/metrics_stdout.h @@ -39,11 +39,11 @@ public: private: static const bool FORCE_NEIGHBOUR_CELL = false; // Set to true for printing always neighbour cells - void set_metrics_helper(const phy_metrics_t phy, - const mac_metrics_t mac[SRSRAN_MAX_CARRIERS], - const rrc_metrics_t rrc, - bool display_neighbours, - const uint32_t r); + void set_metrics_helper(const phy_metrics_t& phy, + const mac_metrics_t mac[SRSRAN_MAX_CARRIERS], + const rrc_metrics_t& rrc, + bool display_neighbours, + const uint32_t r); std::string float_to_string(float f, int digits); std::string float_to_eng_string(float f, int digits); void print_table(const bool display_neighbours); diff --git a/srsue/src/metrics_csv.cc b/srsue/src/metrics_csv.cc index fada41ecb..50f5643c0 100644 --- a/srsue/src/metrics_csv.cc +++ b/srsue/src/metrics_csv.cc @@ -65,13 +65,13 @@ void metrics_csv::stop() } } -void metrics_csv::set_metrics_helper(const srsran::rf_metrics_t rf, - const srsran::sys_metrics_t sys, - const phy_metrics_t phy, - const mac_metrics_t mac[SRSRAN_MAX_CARRIERS], - const rrc_metrics_t rrc, - const uint32_t cc, - const uint32_t r) +void metrics_csv::set_metrics_helper(const srsran::rf_metrics_t& rf, + const srsran::sys_metrics_t& sys, + const phy_metrics_t& phy, + const mac_metrics_t mac[SRSRAN_MAX_CARRIERS], + const rrc_metrics_t& rrc, + const uint32_t cc, + const uint32_t r) { if (not file.is_open()) { return; diff --git a/srsue/src/metrics_stdout.cc b/srsue/src/metrics_stdout.cc index 1a06905b1..3c555e2b8 100644 --- a/srsue/src/metrics_stdout.cc +++ b/srsue/src/metrics_stdout.cc @@ -76,11 +76,11 @@ void metrics_stdout::print_table(const bool display_neighbours) n_reports = 0; } -void metrics_stdout::set_metrics_helper(const phy_metrics_t phy, - const mac_metrics_t mac[SRSRAN_MAX_CARRIERS], - const rrc_metrics_t rrc, - bool display_neighbours, - const uint32_t r) +void metrics_stdout::set_metrics_helper(const phy_metrics_t& phy, + const mac_metrics_t mac[SRSRAN_MAX_CARRIERS], + const rrc_metrics_t& rrc, + bool display_neighbours, + const uint32_t r) { if (phy.info[r].pci != UINT32_MAX) { cout << std::setw(4) << phy.info[r].pci << std::setw(0); diff --git a/srsue/src/stack/mac_nr/ul_harq_nr.cc b/srsue/src/stack/mac_nr/ul_harq_nr.cc index 1ba09a2f3..827a15cc4 100644 --- a/srsue/src/stack/mac_nr/ul_harq_nr.cc +++ b/srsue/src/stack/mac_nr/ul_harq_nr.cc @@ -111,7 +111,9 @@ ul_harq_entity_nr::ul_harq_metrics_t ul_harq_entity_nr::get_metrics() return tmp; } -ul_harq_entity_nr::ul_harq_process_nr::ul_harq_process_nr() : logger(srslog::fetch_basic_logger("MAC")) {} +ul_harq_entity_nr::ul_harq_process_nr::ul_harq_process_nr() : + logger(srslog::fetch_basic_logger("MAC")), softbuffer({0, 0, nullptr}) +{} ul_harq_entity_nr::ul_harq_process_nr::~ul_harq_process_nr() { diff --git a/srsue/src/stack/rrc/rrc_nr.cc b/srsue/src/stack/rrc/rrc_nr.cc index b7f5aeb5e..d49cef10b 100644 --- a/srsue/src/stack/rrc/rrc_nr.cc +++ b/srsue/src/stack/rrc/rrc_nr.cc @@ -1400,7 +1400,7 @@ void rrc_nr::cell_search_completed(const rrc_interface_phy_lte::cell_search_ret_ {} /* Procedures */ -rrc_nr::connection_reconf_no_ho_proc::connection_reconf_no_ho_proc(rrc_nr* parent_) : rrc_ptr(parent_) {} +rrc_nr::connection_reconf_no_ho_proc::connection_reconf_no_ho_proc(rrc_nr* parent_) : rrc_ptr(parent_), initiator(nr) {} proc_outcome_t rrc_nr::connection_reconf_no_ho_proc::init(const reconf_initiator_t initiator_, const bool endc_release_and_add_r15,