fix various uninitialized vars

master
Andre Puschmann 5 years ago committed by Xavier Arteaga
parent db4cc71240
commit 2f47010eb6

@ -88,10 +88,10 @@ int main(int argc, char** argv)
{
cf_t* fft_buffer = NULL;
cf_t* buffer = NULL;
srslte_nsss_synch_t syncobj;
srslte_ofdm_t ifft;
int fft_size;
float peak_value;
srslte_nsss_synch_t syncobj = {};
srslte_ofdm_t ifft = {};
int fft_size = 0;
float peak_value = 0.0;
int num_sf = 1;
int ret = SRSLTE_ERROR;

@ -88,12 +88,12 @@ int main(int argc, char** argv)
cf_t* fft_buffer = NULL;
_Complex float buffer[SFLEN]; // FLEN + fft_size
srslte_filesource_t fsrc;
srslte_filesource_t fsrc = {};
uint32_t find_idx = 0;
srslte_sync_nbiot_t syncobj;
srslte_ofdm_t ifft;
srslte_cfo_t cfocorr;
int fft_size;
srslte_sync_nbiot_t syncobj = {};
srslte_ofdm_t ifft = {};
srslte_cfo_t cfocorr = {};
int fft_size = 0;
input_file_name = NULL;

@ -206,7 +206,7 @@ int test_multiqueue_threading3()
// Should be able to unlock all
multiqueue.reset();
t1.join();
TESTASSERT(t1_success)
TESTASSERT(t1_success);
std::cout << "outcome: Success\n";
std::cout << "===================================================\n";

@ -50,29 +50,29 @@ private:
void run_thread();
const static int INTRA_FREQ_MEAS_PRIO = DEFAULT_PRIORITY + 5;
scell_recv scell;
rrc_interface_phy_lte* rrc;
srslte::log* log_h;
phy_common* common;
uint32_t current_earfcn;
uint32_t current_sflen;
srslte_cell_t primary_cell;
scell_recv scell = {};
rrc_interface_phy_lte* rrc = nullptr;
srslte::log* log_h = nullptr;
phy_common* common = nullptr;
uint32_t current_earfcn = 0;
uint32_t current_sflen = 0;
srslte_cell_t primary_cell = {};
std::vector<int> active_pci;
srslte::tti_sync_cv tti_sync;
cf_t* search_buffer;
cf_t* search_buffer = nullptr;
scell_recv::cell_info_t info[scell_recv::MAX_CELLS];
scell_recv::cell_info_t info[scell_recv::MAX_CELLS] = {};
bool running;
bool receive_enabled;
bool receiving;
uint32_t measure_tti;
uint32_t receive_cnt;
srslte_ringbuffer_t ring_buffer;
bool running = false;
bool receive_enabled = false;
bool receiving = false;
uint32_t measure_tti = 0;
uint32_t receive_cnt = 0;
srslte_ringbuffer_t ring_buffer = {};
srslte_refsignal_dl_sync_t refsignal_dl_sync;
srslte_refsignal_dl_sync_t refsignal_dl_sync = {};
};
} // namespace scell

@ -38,24 +38,6 @@ namespace scell {
intra_measure::intra_measure() : scell(), thread("SYNC_INTRA_MEASURE")
{
rrc = nullptr;
common = nullptr;
search_buffer = nullptr;
log_h = nullptr;
current_earfcn = 0;
current_sflen = 0;
measure_tti = 0;
receive_cnt = 0;
running = false;
receive_enabled = false;
receiving = false;
ZERO_OBJECT(info);
ZERO_OBJECT(ring_buffer);
ZERO_OBJECT(primary_cell);
}
intra_measure::~intra_measure()

Loading…
Cancel
Save