From b8e6ba02e4e65fb24741151a6de8dfd4f0520380 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 27 Apr 2020 14:34:55 +0100 Subject: [PATCH] remove warnings related to unused vars and fwd declarations with trivial dtors --- lib/include/srslte/common/thread_pool.h | 13 +++++++------ srsenb/hdr/phy/prach_worker.h | 1 + srsenb/hdr/stack/mac/scheduler.h | 2 ++ srsenb/hdr/stack/mac/scheduler_carrier.h | 1 + srsenb/src/phy/prach_worker.cc | 2 ++ srsenb/src/stack/mac/scheduler_carrier.cc | 2 ++ srsenb/src/stack/rrc/rrc.cc | 4 ++-- srsue/test/ttcn3/hdr/ttcn3_drb_interface.h | 2 -- srsue/test/ttcn3/hdr/ttcn3_srb_interface.h | 1 - srsue/test/ttcn3/hdr/ttcn3_sys_interface.h | 5 ++--- 10 files changed, 19 insertions(+), 14 deletions(-) diff --git a/lib/include/srslte/common/thread_pool.h b/lib/include/srslte/common/thread_pool.h index 5bc607ba1..0000d8ade 100644 --- a/lib/include/srslte/common/thread_pool.h +++ b/lib/include/srslte/common/thread_pool.h @@ -50,9 +50,10 @@ public: { public: worker(); - void setup(uint32_t id, thread_pool* parent, uint32_t prio = 0, uint32_t mask = 255); - uint32_t get_id(); - void release(); + ~worker() = default; + void setup(uint32_t id, thread_pool* parent, uint32_t prio = 0, uint32_t mask = 255); + uint32_t get_id(); + void release(); protected: virtual void work_imp() = 0; @@ -61,9 +62,9 @@ public: uint32_t my_id = 0; thread_pool* my_parent = nullptr; - void run_thread(); - void wait_to_start(); - void finished(); + void run_thread(); + void wait_to_start(); + void finished(); }; thread_pool(uint32_t nof_workers); diff --git a/srsenb/hdr/phy/prach_worker.h b/srsenb/hdr/phy/prach_worker.h index 1e0d2a848..055586cea 100644 --- a/srsenb/hdr/phy/prach_worker.h +++ b/srsenb/hdr/phy/prach_worker.h @@ -34,6 +34,7 @@ class prach_worker : srslte::thread { public: prach_worker(uint32_t cc_idx_) : buffer_pool(8), thread("PRACH_WORKER") { cc_idx = cc_idx_; } + ~prach_worker(); int init(const srslte_cell_t& cell_, const srslte_prach_cfg_t& prach_cfg_, diff --git a/srsenb/hdr/stack/mac/scheduler.h b/srsenb/hdr/stack/mac/scheduler.h index b6b39526e..36761162f 100644 --- a/srsenb/hdr/stack/mac/scheduler.h +++ b/srsenb/hdr/stack/mac/scheduler.h @@ -69,6 +69,7 @@ public: class metric_dl { public: + virtual ~metric_dl() = default; /* Virtual methods for user metric calculation */ virtual void set_params(const sched_cell_params_t& cell_params_) = 0; virtual void sched_users(std::map& ue_db, dl_sf_sched_itf* tti_sched) = 0; @@ -77,6 +78,7 @@ public: class metric_ul { public: + virtual ~metric_ul() = default; /* Virtual methods for user metric calculation */ virtual void set_params(const sched_cell_params_t& cell_params_) = 0; virtual void sched_users(std::map& ue_db, ul_sf_sched_itf* tti_sched) = 0; diff --git a/srsenb/hdr/stack/mac/scheduler_carrier.h b/srsenb/hdr/stack/mac/scheduler_carrier.h index a014d02ae..6db0bee9b 100644 --- a/srsenb/hdr/stack/mac/scheduler_carrier.h +++ b/srsenb/hdr/stack/mac/scheduler_carrier.h @@ -33,6 +33,7 @@ class sched::carrier_sched { public: explicit carrier_sched(rrc_interface_mac* rrc_, std::map* ue_db_, uint32_t enb_cc_idx_); + ~carrier_sched(); void reset(); void carrier_cfg(const sched_cell_params_t& sched_params_); void set_dl_tti_mask(uint8_t* tti_mask, uint32_t nof_sfs); diff --git a/srsenb/src/phy/prach_worker.cc b/srsenb/src/phy/prach_worker.cc index 4fa4404f4..e8b1e5e50 100644 --- a/srsenb/src/phy/prach_worker.cc +++ b/srsenb/src/phy/prach_worker.cc @@ -24,6 +24,8 @@ namespace srsenb { +prach_worker::~prach_worker() = default; + int prach_worker::init(const srslte_cell_t& cell_, const srslte_prach_cfg_t& prach_cfg_, stack_interface_phy_lte* stack_, diff --git a/srsenb/src/stack/mac/scheduler_carrier.cc b/srsenb/src/stack/mac/scheduler_carrier.cc index b8d23d621..f1c872284 100644 --- a/srsenb/src/stack/mac/scheduler_carrier.cc +++ b/srsenb/src/stack/mac/scheduler_carrier.cc @@ -268,6 +268,8 @@ sched::carrier_sched::carrier_sched(rrc_interface_mac* rrc_, sf_dl_mask.resize(1, 0); } +sched::carrier_sched::~carrier_sched() {} + void sched::carrier_sched::reset() { ra_sched_ptr.reset(); diff --git a/srsenb/src/stack/rrc/rrc.cc b/srsenb/src/stack/rrc/rrc.cc index da49df69a..b9b1a0159 100644 --- a/srsenb/src/stack/rrc/rrc.cc +++ b/srsenb/src/stack/rrc/rrc.cc @@ -1287,7 +1287,7 @@ void rrc::ue::handle_rrc_reconf_complete(rrc_conn_recfg_complete_s* msg, srslte: .rrc_conn_recfg_r8() .rr_cfg_ded.drb_to_add_mod_list[0] .lc_ch_cfg.ul_specific_params.lc_ch_group; - for (const std::pair& erab_pair : erabs) { + for (const std::pair& erab_pair : erabs) { parent->mac->bearer_ue_cfg(rnti, erab_pair.second.id - 2, &bearer_cfg); } @@ -1883,7 +1883,7 @@ void rrc::ue::send_connection_reconf(srslte::unique_byte_buffer_t pdu) // Configure all DRBs uint8_t vec_idx = 0; - for (const std::pair& erab_id_pair : erabs) { + for (const std::pair& erab_id_pair : erabs) { const erab_t& erab = erab_id_pair.second; uint8_t drb_id = erab.id - 4; uint8_t lcid = erab.id - 2; diff --git a/srsue/test/ttcn3/hdr/ttcn3_drb_interface.h b/srsue/test/ttcn3/hdr/ttcn3_drb_interface.h index 356fd8e67..529e76480 100644 --- a/srsue/test/ttcn3/hdr/ttcn3_drb_interface.h +++ b/srsue/test/ttcn3/hdr/ttcn3_drb_interface.h @@ -92,8 +92,6 @@ private: ss_srb_interface* syssim = nullptr; byte_buffer_pool* pool = nullptr; - - int drb_fd = 0; }; #endif // SRSUE_TTCN3_DRB_INTERFACE_H diff --git a/srsue/test/ttcn3/hdr/ttcn3_srb_interface.h b/srsue/test/ttcn3/hdr/ttcn3_srb_interface.h index eca420152..0a83ff219 100644 --- a/srsue/test/ttcn3/hdr/ttcn3_srb_interface.h +++ b/srsue/test/ttcn3/hdr/ttcn3_srb_interface.h @@ -157,7 +157,6 @@ private: ss_srb_interface* syssim = nullptr; byte_buffer_pool* pool = nullptr; - int srb_fd = 0; // struct sctp_sndrcvinfo sri = {}; // struct sockaddr_in client_addr; }; diff --git a/srsue/test/ttcn3/hdr/ttcn3_sys_interface.h b/srsue/test/ttcn3/hdr/ttcn3_sys_interface.h index 8ac0cb331..f0f9128fe 100644 --- a/srsue/test/ttcn3/hdr/ttcn3_sys_interface.h +++ b/srsue/test/ttcn3/hdr/ttcn3_sys_interface.h @@ -598,9 +598,8 @@ private: } } - phy_interface_syssim* phy = nullptr; - ss_sys_interface* syssim = nullptr; - byte_buffer_pool* pool = nullptr; + ss_sys_interface* syssim = nullptr; + byte_buffer_pool* pool = nullptr; }; #endif // SRSUE_TTCN3_SYS_INTERFACE_H