Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34251 )

Change subject: ms: fix a few coverity complaints related to initialization
......................................................................

ms: fix a few coverity complaints related to initialization

Change-Id: I203f4da7a4418fc5053d26901bec649d04fad096
---
M Transceiver52M/ms/ms.h
M Transceiver52M/ms/ms_upper.h
M Transceiver52M/ms/threadpool.h
3 files changed, 18 insertions(+), 8 deletions(-)

Approvals:
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved




diff --git a/Transceiver52M/ms/ms.h b/Transceiver52M/ms/ms.h
index e6dbe4e..4d0f0cd 100644
--- a/Transceiver52M/ms/ms.h
+++ b/Transceiver52M/ms/ms.h
@@ -50,7 +50,7 @@
 template <typename T>
 void clamp_array(T *start2, unsigned int len, T max)
 {
-       for (int i = 0; i < len; i++) {
+       for (unsigned int i = 0; i < len; i++) {
                const T t1 = start2[i] < -max ? -max : start2[i];
                const T t2 = t1 > max ? max : t1;
                start2[i] = t2;
@@ -263,7 +263,6 @@

        std::thread lower_rx_task;
        std::thread lower_tx_task;
-       std::thread *calcrval_task;

        // provides bursts to upper rx thread
        rx_queue_t rxqueue;
@@ -300,10 +299,12 @@
        void maybe_update_gain(one_burst &brst);

        ms_trx()
-               : timing_advance(0), do_auto_gain(false), rxqueue(), 
first_sch_buf(new blade_sample_type[SCH_LEN_SPS]),
-                 burst_copy_buffer(new blade_sample_type[ONE_TS_BURST_LEN]), 
rcv_done{ false },
-                 sch_thread_done{ false }, 
hw_cpus(std::thread::hardware_concurrency()),
-                 hw_target(hw_cpus > 4 ? sched_params::target::ODROID : 
sched_params::target::PI4)
+               : mTSC(0), mBSIC(0), timing_advance(0), do_auto_gain(false), 
rxqueue(),
+                 first_sch_buf(new blade_sample_type[SCH_LEN_SPS]),
+                 burst_copy_buffer(new blade_sample_type[ONE_TS_BURST_LEN]), 
first_sch_buf_rcv_ts(0),
+                 rcv_done{ false }, sch_thread_done{ false }, 
hw_cpus(std::thread::hardware_concurrency()),
+                 hw_target(hw_cpus > 4 ? sched_params::target::ODROID : 
sched_params::target::PI4),
+                 upper_is_ready(false)
        {
                std::cerr << "scheduling for: " << (hw_cpus > 4 ? "odroid" : 
"pi4") << std::endl;
                set_name_aff_sched(worker_thread.get_handle(), 
sched_params::thread_names::SCH_SEARCH);
diff --git a/Transceiver52M/ms/ms_upper.h b/Transceiver52M/ms/ms_upper.h
index 0c430de..06f7c54 100644
--- a/Transceiver52M/ms/ms_upper.h
+++ b/Transceiver52M/ms/ms_upper.h
@@ -44,5 +44,5 @@
        void driveReceiveFIFO();
        void driveTx();

-       upper_trx(){};
+       upper_trx() : mOn(false){};
 };
diff --git a/Transceiver52M/ms/threadpool.h b/Transceiver52M/ms/threadpool.h
index a5dec97..2180c68 100644
--- a/Transceiver52M/ms/threadpool.h
+++ b/Transceiver52M/ms/threadpool.h
@@ -45,7 +45,7 @@
                return;
        }

-       single_thread_pool() : worker_thread(std::thread([this] { 
thread_loop(); }))
+       single_thread_pool() : stop_flag(false), is_ready(false), 
worker_thread(std::thread([this] { thread_loop(); }))
        {
        }
        ~single_thread_pool()

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34251
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I203f4da7a4418fc5053d26901bec649d04fad096
Gerrit-Change-Number: 34251
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen <[email protected]>
Gerrit-Reviewer: Hoernchen <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to