Commit 3ca0f390 authored by francescomani's avatar francescomani

new round of clang warning fixes

parent 98f4d038
...@@ -618,7 +618,7 @@ void init_fep_thread(RU_t *ru, ...@@ -618,7 +618,7 @@ void init_fep_thread(RU_t *ru,
void kill_fep_thread(RU_t *ru) void kill_fep_thread(RU_t *ru)
{ {
RU_proc_t *proc = &ru->proc; RU_proc_t *proc = &ru->proc;
if (proc->pthread_fep == 0) if (proc->pthread_fep[0] == 0)
return; return;
pthread_mutex_lock( &proc->mutex_fep[0] ); pthread_mutex_lock( &proc->mutex_fep[0] );
proc->instance_cnt_fep[0] = 0; proc->instance_cnt_fep[0] = 0;
......
...@@ -707,7 +707,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP, ...@@ -707,7 +707,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
uint16_t msi_control_element[29], *msi_ptr; uint16_t msi_control_element[29], *msi_ptr;
// MSI buffer pointer // MSI buffer pointer
char *buffer_pointer=NULL; char *buffer_pointer=NULL;
if (msi_flag == 1 && cc->mbms_SessionList) { if (msi_flag == 1 && cc->mbms_SessionList[mbms_mch_i]) {
// Create MSI here // Create MSI here
msi_ptr = &msi_control_element[0]; msi_ptr = &msi_control_element[0];
...@@ -867,7 +867,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP, ...@@ -867,7 +867,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
// there is MTCHs, loop if there are more than 1 // there is MTCHs, loop if there are more than 1
// BAd race condition: all this struct is filled by another thread, no mutex or any code to make it coherent // BAd race condition: all this struct is filled by another thread, no mutex or any code to make it coherent
if (mtch_flag == 1 && cc->mbms_SessionList && cc->mbms_SessionList[0] && cc->mbms_SessionList[0]->list.array[0]) { if (mtch_flag == 1 && cc->mbms_SessionList[0] && cc->mbms_SessionList[0]->list.array[0]) {
// Calculate TBS // Calculate TBS
// get MTCH data from RLC (like for DTCH) // get MTCH data from RLC (like for DTCH)
LOG_D(MAC, "[eNB %d] CC_id %d Frame %d subframeP %d: Schedule MTCH (area %d, sfAlloc %d)\n", module_idP, CC_id, frameP, subframeP, i, j); LOG_D(MAC, "[eNB %d] CC_id %d Frame %d subframeP %d: Schedule MTCH (area %d, sfAlloc %d)\n", module_idP, CC_id, frameP, subframeP, i, j);
......
...@@ -488,7 +488,7 @@ void ra_preambles_config(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t ...@@ -488,7 +488,7 @@ void ra_preambles_config(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t
// Overwrite seed with non-random seed for IQ player/recorder // Overwrite seed with non-random seed for IQ player/recorder
seed = 1; seed = 1;
} else { } else {
seed=(unsigned int) (rdtsc_oai() && ~0); seed=(unsigned int) (rdtsc_oai() & ~0);
} }
RA_config_t *ra = &mac->ra; RA_config_t *ra = &mac->ra;
...@@ -1040,7 +1040,7 @@ void nr_ra_failed(uint8_t mod_id, uint8_t CC_id, NR_PRACH_RESOURCES_t *prach_res ...@@ -1040,7 +1040,7 @@ void nr_ra_failed(uint8_t mod_id, uint8_t CC_id, NR_PRACH_RESOURCES_t *prach_res
// Overwrite seed with non-random seed for IQ player/recorder // Overwrite seed with non-random seed for IQ player/recorder
seed = 1; seed = 1;
} else { } else {
seed=(unsigned int) (rdtsc_oai() && ~0); seed=(unsigned int) (rdtsc_oai() & ~0);
} }
ra->first_Msg3 = 1; ra->first_Msg3 = 1;
......
...@@ -1499,7 +1499,7 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -1499,7 +1499,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
//memset((*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310, 0, sizeof(BCCH_Config_v1310_t)); //memset((*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310, 0, sizeof(BCCH_Config_v1310_t));
//(*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310->modificationPeriodCoeff_v1310 = BCCH_Config_v1310__modificationPeriodCoeff_v1310_n64; //(*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310->modificationPeriodCoeff_v1310 = BCCH_Config_v1310__modificationPeriodCoeff_v1310_n64;
if (configuration->pcch_config_v1310) { if (configuration->pcch_config_v1310[CC_id] == true) {
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310 = CALLOC(1, sizeof(LTE_PCCH_Config_v1310_t)); (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310 = CALLOC(1, sizeof(LTE_PCCH_Config_v1310_t));
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->paging_narrowBands_r13 = configuration->paging_narrowbands_r13[CC_id]; (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->paging_narrowBands_r13 = configuration->paging_narrowbands_r13[CC_id];
(*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->mpdcch_NumRepetition_Paging_r13 = configuration->mpdcch_numrepetition_paging_r13[CC_id]; (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310->mpdcch_NumRepetition_Paging_r13 = configuration->mpdcch_numrepetition_paging_r13[CC_id];
......
...@@ -14,7 +14,7 @@ int get_from_lte_ue_fd() ...@@ -14,7 +14,7 @@ int get_from_lte_ue_fd()
return from_lte_ue_fd; return from_lte_ue_fd;
} }
void nsa_sendmsg_to_lte_ue(const void *message, size_t msg_len, MessagesIds msg_type) void nsa_sendmsg_to_lte_ue(const void *message, size_t msg_len, Rrc_Msg_Type_t msg_type)
{ {
LOG_I(NR_RRC, "Entered %s \n", __FUNCTION__); LOG_I(NR_RRC, "Entered %s \n", __FUNCTION__);
nsa_msg_t n_msg; nsa_msg_t n_msg;
......
...@@ -160,7 +160,7 @@ void *recv_msgs_from_lte_ue(void *args_p); ...@@ -160,7 +160,7 @@ void *recv_msgs_from_lte_ue(void *args_p);
void init_connections_with_lte_ue(void); void init_connections_with_lte_ue(void);
void nsa_sendmsg_to_lte_ue(const void *message, size_t msg_len, MessagesIds msg_type); void nsa_sendmsg_to_lte_ue(const void *message, size_t msg_len, Rrc_Msg_Type_t msg_type);
void start_oai_nrue_threads(void); void start_oai_nrue_threads(void);
......
...@@ -111,17 +111,17 @@ int emm_sap_send(nas_user_t *user, emm_sap_t *msg) ...@@ -111,17 +111,17 @@ int emm_sap_send(nas_user_t *user, emm_sap_t *msg)
if ( (primitive > (emm_primitive_t)EMMREG_PRIMITIVE_MIN) && if ( (primitive > (emm_primitive_t)EMMREG_PRIMITIVE_MIN) &&
(primitive < (emm_primitive_t)EMMREG_PRIMITIVE_MAX) ) { (primitive < (emm_primitive_t)EMMREG_PRIMITIVE_MAX) ) {
/* Forward to the EMMREG-SAP */ /* Forward to the EMMREG-SAP */
msg->u.emm_reg.primitive = primitive; msg->u.emm_reg.primitive = (emm_reg_primitive_t) primitive;
rc = emm_reg_send(user, &msg->u.emm_reg); rc = emm_reg_send(user, &msg->u.emm_reg);
} else if ( (primitive > (emm_primitive_t)EMMESM_PRIMITIVE_MIN) && } else if ( (primitive > (emm_primitive_t)EMMESM_PRIMITIVE_MIN) &&
(primitive < (emm_primitive_t)EMMESM_PRIMITIVE_MAX) ) { (primitive < (emm_primitive_t)EMMESM_PRIMITIVE_MAX) ) {
/* Forward to the EMMESM-SAP */ /* Forward to the EMMESM-SAP */
msg->u.emm_esm.primitive = primitive; msg->u.emm_esm.primitive = (emm_esm_primitive_t) primitive;
rc = emm_esm_send(user, &msg->u.emm_esm); rc = emm_esm_send(user, &msg->u.emm_esm);
} else if ( (primitive > (emm_primitive_t)EMMAS_PRIMITIVE_MIN) && } else if ( (primitive > (emm_primitive_t)EMMAS_PRIMITIVE_MIN) &&
(primitive < (emm_primitive_t)EMMAS_PRIMITIVE_MAX) ) { (primitive < (emm_primitive_t)EMMAS_PRIMITIVE_MAX) ) {
/* Forward to the EMMAS-SAP */ /* Forward to the EMMAS-SAP */
msg->u.emm_as.primitive = primitive; msg->u.emm_as.primitive = (emm_as_primitive_t) primitive;
rc = emm_as_send(user, &msg->u.emm_as); rc = emm_as_send(user, &msg->u.emm_as);
} }
else { else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment