Fixed issues from coverity:

- 370233
- 370234
- 370239
- 370240
- 370241
- 370242
- 370243
- 370295
master
AlaiaL 4 years ago committed by Andre Puschmann
parent 0f06ec0d9c
commit 82788ca094

@ -23,13 +23,15 @@ struct rx_thread_tester {
std::thread t; std::thread t;
rx_thread_tester() : 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); stop_token.store(false);
while (not stop_token.load(std::memory_order_relaxed)) { while (not stop_token.load(std::memory_order_relaxed)) {
task_sched.run_pending_tasks(); task_sched.run_pending_tasks();
std::this_thread::sleep_for(std::chrono::microseconds(100)); std::this_thread::sleep_for(std::chrono::microseconds(100));
} }
}) }),
stop_token(false)
{} {}
~rx_thread_tester() ~rx_thread_tester()
{ {

@ -266,7 +266,6 @@ int main(int argc, char** argv)
if (srsran_ue_dl_nr_set_carrier(&ue_dl, &carrier)) { if (srsran_ue_dl_nr_set_carrier(&ue_dl, &carrier)) {
ERROR("Error setting SCH NR carrier"); ERROR("Error setting SCH NR carrier");
goto clean_exit; goto clean_exit;
goto clean_exit;
} }
srsran_dci_cfg_nr_t dci_cfg = {}; srsran_dci_cfg_nr_t dci_cfg = {};

@ -34,7 +34,8 @@ class stack_interface_phy_lte;
class prach_worker : srsran::thread class prach_worker : srsran::thread
{ {
public: 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_; cc_idx = cc_idx_;
} }

@ -34,7 +34,7 @@ using namespace std;
namespace srsenb { 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 */ /* Do nothing */
} }

@ -42,13 +42,13 @@ public:
void stop(); void stop();
private: private:
void set_metrics_helper(const srsran::rf_metrics_t rf, void set_metrics_helper(const srsran::rf_metrics_t& rf,
const srsran::sys_metrics_t sys, const srsran::sys_metrics_t& sys,
const phy_metrics_t phy, const phy_metrics_t& phy,
const mac_metrics_t mac[SRSRAN_MAX_CARRIERS], const mac_metrics_t mac[SRSRAN_MAX_CARRIERS],
const rrc_metrics_t rrc, const rrc_metrics_t& rrc,
const uint32_t cc, const uint32_t cc,
const uint32_t r); const uint32_t r);
std::string float_to_string(float f, int digits, bool add_semicolon = true); std::string float_to_string(float f, int digits, bool add_semicolon = true);

@ -39,11 +39,11 @@ public:
private: private:
static const bool FORCE_NEIGHBOUR_CELL = false; // Set to true for printing always neighbour cells static const bool FORCE_NEIGHBOUR_CELL = false; // Set to true for printing always neighbour cells
void set_metrics_helper(const phy_metrics_t phy, void set_metrics_helper(const phy_metrics_t& phy,
const mac_metrics_t mac[SRSRAN_MAX_CARRIERS], const mac_metrics_t mac[SRSRAN_MAX_CARRIERS],
const rrc_metrics_t rrc, const rrc_metrics_t& rrc,
bool display_neighbours, bool display_neighbours,
const uint32_t r); const uint32_t r);
std::string float_to_string(float f, int digits); std::string float_to_string(float f, int digits);
std::string float_to_eng_string(float f, int digits); std::string float_to_eng_string(float f, int digits);
void print_table(const bool display_neighbours); void print_table(const bool display_neighbours);

@ -65,13 +65,13 @@ void metrics_csv::stop()
} }
} }
void metrics_csv::set_metrics_helper(const srsran::rf_metrics_t rf, void metrics_csv::set_metrics_helper(const srsran::rf_metrics_t& rf,
const srsran::sys_metrics_t sys, const srsran::sys_metrics_t& sys,
const phy_metrics_t phy, const phy_metrics_t& phy,
const mac_metrics_t mac[SRSRAN_MAX_CARRIERS], const mac_metrics_t mac[SRSRAN_MAX_CARRIERS],
const rrc_metrics_t rrc, const rrc_metrics_t& rrc,
const uint32_t cc, const uint32_t cc,
const uint32_t r) const uint32_t r)
{ {
if (not file.is_open()) { if (not file.is_open()) {
return; return;

@ -76,11 +76,11 @@ void metrics_stdout::print_table(const bool display_neighbours)
n_reports = 0; n_reports = 0;
} }
void metrics_stdout::set_metrics_helper(const phy_metrics_t phy, void metrics_stdout::set_metrics_helper(const phy_metrics_t& phy,
const mac_metrics_t mac[SRSRAN_MAX_CARRIERS], const mac_metrics_t mac[SRSRAN_MAX_CARRIERS],
const rrc_metrics_t rrc, const rrc_metrics_t& rrc,
bool display_neighbours, bool display_neighbours,
const uint32_t r) const uint32_t r)
{ {
if (phy.info[r].pci != UINT32_MAX) { if (phy.info[r].pci != UINT32_MAX) {
cout << std::setw(4) << phy.info[r].pci << std::setw(0); cout << std::setw(4) << phy.info[r].pci << std::setw(0);

@ -111,7 +111,9 @@ ul_harq_entity_nr::ul_harq_metrics_t ul_harq_entity_nr::get_metrics()
return tmp; 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() ul_harq_entity_nr::ul_harq_process_nr::~ul_harq_process_nr()
{ {

@ -1400,7 +1400,7 @@ void rrc_nr::cell_search_completed(const rrc_interface_phy_lte::cell_search_ret_
{} {}
/* Procedures */ /* 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_, proc_outcome_t rrc_nr::connection_reconf_no_ho_proc::init(const reconf_initiator_t initiator_,
const bool endc_release_and_add_r15, const bool endc_release_and_add_r15,

Loading…
Cancel
Save