diff --git a/lib/examples/usrp_capture_sync.c b/lib/examples/usrp_capture_sync.c index df13381fa..4c0af5ee0 100644 --- a/lib/examples/usrp_capture_sync.c +++ b/lib/examples/usrp_capture_sync.c @@ -122,11 +122,11 @@ int srslte_rf_recv_wrapper(void* h, cf_t* data[SRSLTE_MAX_PORTS], uint32_t nsamp int main(int argc, char** argv) { cf_t* buffer[SRSLTE_MAX_CHANNELS] = {NULL}; - int n; - srslte_rf_t rf; - srslte_filesink_t sink; - srslte_ue_sync_t ue_sync; - srslte_cell_t cell; + int n = 0; + srslte_rf_t rf = {}; + srslte_filesink_t sink = {}; + srslte_ue_sync_t ue_sync = {}; + srslte_cell_t cell = {}; signal(SIGINT, int_handler); diff --git a/lib/src/phy/ch_estimation/chest_sl.c b/lib/src/phy/ch_estimation/chest_sl.c index 0ce0fcae8..82eb15e34 100644 --- a/lib/src/phy/ch_estimation/chest_sl.c +++ b/lib/src/phy/ch_estimation/chest_sl.c @@ -120,7 +120,7 @@ static int chest_sl_psbch_gen(srslte_chest_sl_t* q) u[ns] = (f_gh + f_ss) % SRSLTE_SL_N_RU_SEQ; } - int32_t N_zc = 0; // N_zc - Zadoff Chu Sequence Length + int32_t N_zc = prime_numbers[0]; // N_zc - Zadoff Chu Sequence Length for (uint32_t i = NOF_PRIME_NUMBERS - 1; i > 0; i--) { if (prime_numbers[i] < q->M_sc_rs) { N_zc = prime_numbers[i]; diff --git a/lib/src/phy/phch/test/dci_nbiot_test.c b/lib/src/phy/phch/test/dci_nbiot_test.c index 1bbd030c8..64a5c102e 100644 --- a/lib/src/phy/phch/test/dci_nbiot_test.c +++ b/lib/src/phy/phch/test/dci_nbiot_test.c @@ -52,7 +52,7 @@ int dl_timing_test() cf_t rx_buff[SRSLTE_SF_LEN_PRB_NBIOT]; cf_t* buff_ptrs[SRSLTE_MAX_PORTS] = {rx_buff, NULL, NULL, NULL}; - srslte_nbiot_ue_dl_t ue_dl; + srslte_nbiot_ue_dl_t ue_dl = {}; if (srslte_nbiot_ue_dl_init(&ue_dl, buff_ptrs, SRSLTE_NBIOT_MAX_PRB, SRSLTE_NBIOT_NUM_RX_ANTENNAS)) { fprintf(stderr, "Error initializing UE DL\n"); return SRSLTE_ERROR; @@ -63,13 +63,13 @@ int dl_timing_test() return SRSLTE_ERROR; } - srslte_mib_nb_t mib; + srslte_mib_nb_t mib = {}; mib.sched_info_sib1 = 2; srslte_nbiot_ue_dl_set_mib(&ue_dl, mib); // a dummy grant uint8_t dci_bits_packed[] = {0x81, 0x00, 0x00}; - srslte_dci_msg_t dci_tmp; + srslte_dci_msg_t dci_tmp = {}; dci_tmp.format = SRSLTE_DCI_FORMATN1; dci_tmp.nof_bits = 23; srslte_bit_unpack_vector(dci_bits_packed, dci_tmp.payload, dci_tmp.nof_bits);