diff --git a/common/utils/ocp_itti/intertask_interface.h b/common/utils/ocp_itti/intertask_interface.h index 19b0ba32a9..131606f6fe 100644 --- a/common/utils/ocp_itti/intertask_interface.h +++ b/common/utils/ocp_itti/intertask_interface.h @@ -64,6 +64,9 @@ typedef struct itti_lte_time_s { typedef struct IttiMsgEmpty_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } IttiMsgEmpty; typedef struct IttiMsgText_s { diff --git a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h index 5e8fde4487..7ce7da2290 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h @@ -1897,6 +1897,9 @@ typedef struct { } nfapi_ul_config_periodic_cqi_pmi_ri_report_re13_t; typedef struct { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } nfapi_ul_config_aperiodic_cqi_pmi_ri_report_re13_t; typedef struct { @@ -3020,9 +3023,15 @@ typedef struct { #define NFAPI_LBT_DL_INDICATION_BODY_TAG 0x2058 typedef struct { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } nfapi_error_indication_msg_invalid_state; typedef struct { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } nfapi_error_indication_msg_bch_missing; typedef struct { diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index d8ffdcc55e..5c9a443a0b 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -1225,7 +1225,7 @@ int main(int argc, char **argv) tx_offset = frame_parms->get_samples_slot_timestamp(slot, frame_parms, 0); txlev_sum = 0; for (int aa = 0; aa < UE->frame_parms.nb_antennas_tx; aa++) { - atxlev[aa] = signal_energy((int32_t*)&UE->common_vars.txdata[aa][tx_offset + 5 * frame_parms->ofdm_symbol_size + 4 * frame_parms->nb_prefix_samples + frame_parms->nb_prefix_samples0], + atxlev[aa] = signal_energy((int32_t *)&UE->common_vars.txdata[aa][tx_offset + 5 * frame_parms->ofdm_symbol_size + 4 * frame_parms->nb_prefix_samples + frame_parms->nb_prefix_samples0], frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples); txlev_sum += atxlev[aa]; diff --git a/openair2/COMMON/as_message.h b/openair2/COMMON/as_message.h index ef7314697f..89d61d3fa5 100644 --- a/openair2/COMMON/as_message.h +++ b/openair2/COMMON/as_message.h @@ -469,7 +469,11 @@ typedef ul_info_transfer_ind_t dl_info_transfer_ind_t; */ /* TODO: Quality of Service parameters */ -typedef struct {} as_qos_t; +typedef struct { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; +} as_qos_t; /* * NAS->AS - Radio access bearer establishment request diff --git a/openair2/COMMON/f1ap_messages_types.h b/openair2/COMMON/f1ap_messages_types.h index d8aac0fff1..9d507df8f3 100644 --- a/openair2/COMMON/f1ap_messages_types.h +++ b/openair2/COMMON/f1ap_messages_types.h @@ -73,7 +73,9 @@ typedef struct f1ap_net_ip_address_s { } f1ap_net_ip_address_t; typedef struct f1ap_cu_setup_req_s { - // + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } f1ap_cu_setup_req_t; typedef struct cellIDs_s { diff --git a/openair2/COMMON/m2ap_messages_types.h b/openair2/COMMON/m2ap_messages_types.h index 90d1cd386d..4187f1736c 100644 --- a/openair2/COMMON/m2ap_messages_types.h +++ b/openair2/COMMON/m2ap_messages_types.h @@ -90,7 +90,9 @@ typedef struct m2ap_net_ip_address_s { } m2ap_net_ip_address_t; typedef struct m2ap_enb_setup_req_s { - // + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_enb_setup_req_t; @@ -449,6 +451,9 @@ typedef struct m2ap_register_enb_req_s { typedef struct m2ap_subframe_process_s { /* nothing, we simply use the module ID in the header */ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_subframe_process_t; //-------------------------------------------------------------------------------------------// @@ -533,48 +538,114 @@ typedef struct m2ap_enb_sctp_req_s { typedef struct m2ap_mbms_scheduling_information_resp_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_mbms_scheduling_information_resp_t; typedef struct m2ap_session_start_req_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_session_start_req_t; typedef struct m2ap_session_start_resp_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_session_start_resp_t; typedef struct m2ap_session_start_failure_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_session_start_failure_t; typedef struct m2ap_session_stop_req_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_session_stop_req_t; typedef struct m2ap_session_stop_resp_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_session_stop_resp_t; typedef struct m2ap_reset_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_reset_t; typedef struct m2ap_enb_configuration_update_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_enb_configuration_update_t; typedef struct m2ap_enb_configuration_update_ack_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_enb_configuration_update_ack_t; typedef struct m2ap_enb_configuration_update_failure_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_enb_configuration_update_failure_t; typedef struct m2ap_mce_configuration_update_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_mce_configuration_update_t; typedef struct m2ap_mce_configuration_update_ack_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_mce_configuration_update_ack_t; typedef struct m2ap_mce_configuration_update_failure_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_mce_configuration_update_failure_t; typedef struct m2ap_error_indication_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m2ap_error_indication_t; typedef struct m2ap_mbms_session_update_req_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_mbms_session_update_req_t; typedef struct m2ap_mbms_session_update_resp_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_mbms_session_update_resp_t; typedef struct m2ap_mbms_session_update_failure_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_mbms_session_update_failure_t; typedef struct m2ap_mbms_service_counting_report_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_mbms_service_counting_report_t; typedef struct m2ap_mbms_overload_notification_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_mbms_overload_notification_t; typedef struct m2ap_mbms_service_counting_req_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_mbms_service_counting_req_t; typedef struct m2ap_mbms_service_counting_resp_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_mbms_service_counting_resp_t; typedef struct m2ap_mbms_service_counting_failure_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m2ap_mbms_service_counting_failure_t; diff --git a/openair2/COMMON/m3ap_messages_types.h b/openair2/COMMON/m3ap_messages_types.h index 36ac8fcc9a..815f8b6df4 100644 --- a/openair2/COMMON/m3ap_messages_types.h +++ b/openair2/COMMON/m3ap_messages_types.h @@ -160,6 +160,9 @@ typedef struct m3ap_register_mce_req_s { typedef struct m3ap_subframe_process_s { /* nothing, we simply use the module ID in the header */ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } m3ap_subframe_process_t; //-------------------------------------------------------------------------------------------// @@ -270,28 +273,64 @@ typedef struct m3ap_mme_sctp_req_s { typedef struct m3ap_session_start_req_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_session_start_req_t; typedef struct m3ap_session_start_resp_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_session_start_resp_t; typedef struct m3ap_session_start_failure_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_session_start_failure_t; typedef struct m3ap_session_stop_req_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_session_stop_req_t; typedef struct m3ap_session_stop_resp_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_session_stop_resp_t; typedef struct m3ap_session_stop_failure_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_session_stop_failure_t; typedef struct m3ap_error_indication_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_error_indication_t; typedef struct m3ap_reset_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_reset_t; typedef struct m3ap_reset_ack_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_reset_ack_t; typedef struct m3ap_mbms_session_update_req_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_mbms_session_update_req_t; typedef struct m3ap_mbms_session_update_resp_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_mbms_session_update_resp_t; typedef struct m3ap_mbms_session_update_failure_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_mbms_session_update_failure_t; typedef struct m3ap_setup_req_s{ /* Connexion id used between SCTP/M3AP */ @@ -306,14 +345,29 @@ typedef struct m3ap_setup_req_s{ uint16_t default_sctp_stream_id; }m3ap_setup_req_t; typedef struct m3ap_setup_resp_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_setup_resp_t; typedef struct m3ap_setup_failure_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_setup_failure_t; typedef struct m3ap_mce_configuration_update_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_mce_configuration_update_t; typedef struct m3ap_mce_configuration_update_ack_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_mce_configuration_update_ack_t; typedef struct m3ap_mce_configuration_update_failure_s{ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; }m3ap_mce_configuration_update_failure_t; diff --git a/openair2/COMMON/phy_messages_types.h b/openair2/COMMON/phy_messages_types.h index 40e4678228..aef018db76 100644 --- a/openair2/COMMON/phy_messages_types.h +++ b/openair2/COMMON/phy_messages_types.h @@ -82,6 +82,9 @@ typedef struct PhyConfigurationReq_s { // UE: RRC -> PHY messages typedef struct PhyDeactivateReq_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } PhyDeactivateReq; typedef struct PhyFindCellReq_s { @@ -93,9 +96,15 @@ typedef struct PhyFindCellReq_s { } PhyFindCellReq; typedef struct PhyFindNextCellReq_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } PhyFindNextCellReq; typedef struct PhyMeasThresholdReq_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; # if ENABLE_RAL ral_transaction_id_t transaction_id; ral_link_cfg_param_t cfg_param; @@ -103,6 +112,9 @@ typedef struct PhyMeasThresholdReq_s { } PhyMeasThresholdReq; typedef struct PhyMeasReportInd_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; # if ENABLE_RAL ral_threshold_t threshold; ral_link_param_t link_param; @@ -119,6 +131,9 @@ typedef struct PhyFindCellInd_s { } PhyFindCellInd; typedef struct PhyMeasThresholdConf_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; # if ENABLE_RAL ral_transaction_id_t transaction_id; ral_status_t status; diff --git a/openair2/COMMON/x2ap_messages_types.h b/openair2/COMMON/x2ap_messages_types.h index cd092b6ca8..ca01be5035 100644 --- a/openair2/COMMON/x2ap_messages_types.h +++ b/openair2/COMMON/x2ap_messages_types.h @@ -174,6 +174,9 @@ typedef struct x2ap_register_enb_req_s { typedef struct x2ap_subframe_process_s { /* nothing, we simply use the module ID in the header */ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } x2ap_subframe_process_t; //-------------------------------------------------------------------------------------------// diff --git a/openair2/ENB_APP/enb_paramdef_mme.h b/openair2/ENB_APP/enb_paramdef_mme.h index fde9b1c3a8..b1deee0e8e 100644 --- a/openair2/ENB_APP/enb_paramdef_mme.h +++ b/openair2/ENB_APP/enb_paramdef_mme.h @@ -45,9 +45,9 @@ #define MME_CONFIG_STRING_MME_M3 "enable_mme_m3" #define MMEPARAMS_DESC {\ -{MME_CONFIG_STRING_MME_ID, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{MME_CONFIG_STRING_MME_NAME, NULL, 0, strptr:NULL, defstrval:"OAIMME", TYPE_STRING, 0}, \ -{MME_CONFIG_STRING_MME_M3, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \ +{MME_CONFIG_STRING_MME_ID, NULL, 0, .uptr=NULL, .defintval=0, TYPE_UINT, 0}, \ +{MME_CONFIG_STRING_MME_NAME, NULL, 0, .strptr=NULL, .defstrval="OAIMME", TYPE_STRING, 0}, \ +{MME_CONFIG_STRING_MME_M3, NULL, 0, .strptr=NULL, .defstrval="no", TYPE_STRING, 0}, \ } #define MME_MME_ID_IDX 0 @@ -75,9 +75,9 @@ #define MME_NETPARAMS_DESC { \ -{MME_CONFIG_STRING_MME_INTERFACE_NAME_FOR_M3_MCE, NULL, 0, strptr:&mme_interface_name_for_m3_mce, defstrval:"lo", TYPE_STRING, 0}, \ -{MME_CONFIG_STRING_MME_IPV4_ADDRESS_FOR_M3C, NULL, 0, strptr:&mme_ipv4_address_for_m3c, defstrval:"127.0.0.18/24", TYPE_STRING, 0}, \ -{MME_CONFIG_STRING_MME_PORT_FOR_M3C, NULL, 0, uptr:&mme_port_for_m3c, defintval:36444L, TYPE_UINT, 0}, \ +{MME_CONFIG_STRING_MME_INTERFACE_NAME_FOR_M3_MCE, NULL, 0, .strptr=&mme_interface_name_for_m3_mce, .defstrval="lo", TYPE_STRING, 0}, \ +{MME_CONFIG_STRING_MME_IPV4_ADDRESS_FOR_M3C, NULL, 0, .strptr=&mme_ipv4_address_for_m3c, .defstrval="127.0.0.18/24", TYPE_STRING, 0}, \ +{MME_CONFIG_STRING_MME_PORT_FOR_M3C, NULL, 0, .uptr=&mme_port_for_m3c, .defintval=36444L, TYPE_UINT, 0}, \ } #endif diff --git a/openair2/RRC/NR/nr_rrc_config.c b/openair2/RRC/NR/nr_rrc_config.c index 3e506b964c..7437e7060e 100644 --- a/openair2/RRC/NR/nr_rrc_config.c +++ b/openair2/RRC/NR/nr_rrc_config.c @@ -946,7 +946,7 @@ static void set_SR_periodandoffset(NR_SchedulingRequestResourceConfig_t *schedul schedulingRequestResourceConfig->periodicityAndOffset->choice.sl160 = sr_slot; return; } - else if(sr_slot < 320 || NR_SubcarrierSpacing_kHz60){ + else if(sr_slot < 320 || scs == NR_SubcarrierSpacing_kHz60){ schedulingRequestResourceConfig->periodicityAndOffset->present = NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl320; schedulingRequestResourceConfig->periodicityAndOffset->choice.sl320 = sr_slot; return; diff --git a/openair3/NAS/COMMON/IES/TrafficFlowTemplate.h b/openair3/NAS/COMMON/IES/TrafficFlowTemplate.h index 651ec7ef5c..b4f7a5df26 100644 --- a/openair3/NAS/COMMON/IES/TrafficFlowTemplate.h +++ b/openair3/NAS/COMMON/IES/TrafficFlowTemplate.h @@ -96,7 +96,11 @@ typedef struct { * and "no TFT operation" shall be empty. * --------------------------------------------------------------- */ -typedef struct {} NoPacketFilter; +typedef struct { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; +} NoPacketFilter; typedef NoPacketFilter DeleteExistingTft; typedef NoPacketFilter NoTftOperation; @@ -155,7 +159,9 @@ typedef union { */ typedef struct { - /* TODO */ + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; } ParameterList; /* diff --git a/openair3/NAS/UE/API/USER/at_command.h b/openair3/NAS/UE/API/USER/at_command.h index b7bdb11b75..658dbc7a08 100644 --- a/openair3/NAS/UE/API/USER/at_command.h +++ b/openair3/NAS/UE/API/USER/at_command.h @@ -160,7 +160,11 @@ typedef enum { /* CGSN AT command type */ #define AT_COMMAND_CGSN_MASK AT_COMMAND_NO_PARAM -typedef struct at_cgsn_s {} at_cgsn_t; +typedef struct at_cgsn_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; +} at_cgsn_t; /* CGMI: Request manufacturer identification * ----------------------------------------- @@ -172,7 +176,11 @@ typedef struct at_cgsn_s {} at_cgsn_t; /* CGMI AT command type */ #define AT_COMMAND_CGMI_MASK AT_COMMAND_NO_PARAM -typedef struct at_cgmi_s {} at_cgmi_t; +typedef struct at_cgmi_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; +} at_cgmi_t; /* CGMM: Request model identification * ---------------------------------- @@ -184,7 +192,11 @@ typedef struct at_cgmi_s {} at_cgmi_t; /* CGMM AT command type */ #define AT_COMMAND_CGMM_MASK AT_COMMAND_NO_PARAM -typedef struct at_cgmm_s {} at_cgmm_t; +typedef struct at_cgmm_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; +} at_cgmm_t; /* CGMR: Request revision identification * ------------------------------------- @@ -197,7 +209,11 @@ typedef struct at_cgmm_s {} at_cgmm_t; /* CGMR AT command type */ #define AT_COMMAND_CGMR_MASK AT_COMMAND_NO_PARAM -typedef struct at_cgmr_s {} at_cgmr_t; +typedef struct at_cgmr_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; +} at_cgmr_t; /* CIMI: Request International Mobile Subscriber Identity * ------------------------------------------------------ @@ -210,7 +226,11 @@ typedef struct at_cgmr_s {} at_cgmr_t; /* CIMI AT command type */ #define AT_COMMAND_CIMI_MASK AT_COMMAND_NO_PARAM -typedef struct at_cimi_s {} at_cimi_t; +typedef struct at_cimi_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; +} at_cimi_t; /* * ============================================== @@ -288,7 +308,11 @@ typedef struct { /* CSQ AT command type */ #define AT_COMMAND_CSQ_MASK AT_COMMAND_NO_PARAM -typedef struct at_csq_s {} at_csq_t; +typedef struct at_csq_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; +} at_csq_t; /* CESQ: Extented signal quality * ----------------------------- @@ -299,7 +323,11 @@ typedef struct at_csq_s {} at_csq_t; /* CESQ AT command type */ #define AT_COMMAND_CESQ_MASK AT_COMMAND_NO_PARAM -typedef struct at_cesq_s {} at_cesq_t; +typedef struct at_cesq_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; +} at_cesq_t; /* CLAC: List all available AT commands * ------------------------------------ @@ -310,7 +338,11 @@ typedef struct at_cesq_s {} at_cesq_t; /* CLAC AT command type */ #define AT_COMMAND_CLAC_MASK AT_COMMAND_NO_PARAM -typedef struct at_clac_s {} at_clac_t; +typedef struct at_clac_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; +} at_clac_t; /* * ========================= @@ -363,7 +395,11 @@ typedef struct { /* CNUM AT command type */ #define AT_COMMAND_CNUM_MASK AT_COMMAND_NO_PARAM -typedef struct at_cnum_s {} at_cnum_t; +typedef struct at_cnum_s { + // This dummy element is to avoid CLANG warning: empty struct has size 0 in C, size 1 in C++ + // To be removed if the structure is filled + uint32_t dummy; +} at_cnum_t; /* CLCK: Facility lock * ------------------- diff --git a/openair3/NGAP/ngap_gNB_context_management_procedures.c b/openair3/NGAP/ngap_gNB_context_management_procedures.c index 8d3c20d218..c9db35e8c8 100644 --- a/openair3/NGAP/ngap_gNB_context_management_procedures.c +++ b/openair3/NGAP/ngap_gNB_context_management_procedures.c @@ -188,8 +188,31 @@ int ngap_ue_context_release_req(instance_t instance, ie->criticality = NGAP_Criticality_ignore; ie->value.present = NGAP_UEContextReleaseRequest_IEs__value_PR_Cause; DevAssert(ue_release_req_p->cause <= NGAP_Cause_PR_choice_ExtensionS); - ie->value.choice.Cause.present = ue_release_req_p->cause; - ie->value.choice.Cause.choice.misc = ue_release_req_p->cause_value; + switch(ue_release_req_p->cause){ + case NGAP_CAUSE_RADIO_NETWORK: + ie->value.choice.Cause.present = NGAP_Cause_PR_radioNetwork; + ie->value.choice.Cause.choice.radioNetwork = ue_release_req_p->cause_value; + break; + case NGAP_CAUSE_TRANSPORT: + ie->value.choice.Cause.present = NGAP_Cause_PR_transport; + ie->value.choice.Cause.choice.transport = ue_release_req_p->cause_value; + break; + case NGAP_CAUSE_NAS: + ie->value.choice.Cause.present = NGAP_Cause_PR_nas; + ie->value.choice.Cause.choice.nas = ue_release_req_p->cause_value; + break; + case NGAP_CAUSE_PROTOCOL: + ie->value.choice.Cause.present = NGAP_Cause_PR_protocol; + ie->value.choice.Cause.choice.protocol = ue_release_req_p->cause_value; + break; + case NGAP_CAUSE_MISC: + ie->value.choice.Cause.present = NGAP_Cause_PR_misc; + ie->value.choice.Cause.choice.misc = ue_release_req_p->cause_value; + break; + default: + NGAP_WARN("Received NG Error indication cause NGAP_Cause_PR_choice_Extensions\n"); + break; + } } if (ngap_gNB_encode_pdu(&pdu, &buffer, &length) < 0) { diff --git a/openair3/NGAP/ngap_gNB_nas_procedures.c b/openair3/NGAP/ngap_gNB_nas_procedures.c index fdbe6ce0f9..8266b1ad95 100644 --- a/openair3/NGAP/ngap_gNB_nas_procedures.c +++ b/openair3/NGAP/ngap_gNB_nas_procedures.c @@ -665,25 +665,29 @@ int ngap_gNB_initial_ctxt_resp(instance_t instance, ngap_initial_context_setup_r item->pDUSessionID = initial_ctxt_resp_p->pdusessions_failed[i].pdusession_id; /* cause */ - pdusessionUnTransfer.cause.present = initial_ctxt_resp_p->pdusessions_failed[i].cause; - switch (pdusessionUnTransfer.cause.present) { + switch(initial_ctxt_resp_p->pdusessions_failed[i].cause) { case NGAP_CAUSE_RADIO_NETWORK: + pdusessionUnTransfer.cause.present = NGAP_Cause_PR_radioNetwork; pdusessionUnTransfer.cause.choice.radioNetwork = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; break; case NGAP_CAUSE_TRANSPORT: + pdusessionUnTransfer.cause.present = NGAP_Cause_PR_transport; pdusessionUnTransfer.cause.choice.transport = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; break; case NGAP_CAUSE_NAS: + pdusessionUnTransfer.cause.present = NGAP_Cause_PR_nas; pdusessionUnTransfer.cause.choice.nas = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; break; case NGAP_CAUSE_PROTOCOL: + pdusessionUnTransfer.cause.present = NGAP_Cause_PR_protocol; pdusessionUnTransfer.cause.choice.protocol = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; break; case NGAP_CAUSE_MISC: + pdusessionUnTransfer.cause.present = NGAP_Cause_PR_misc; pdusessionUnTransfer.cause.choice.misc = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; break; @@ -928,25 +932,29 @@ int ngap_gNB_pdusession_setup_resp(instance_t instance, ngap_pdusession_setup_re item->pDUSessionID = pdusession_failed->pdusession_id; /* cause */ - pdusessionUnTransfer_p.cause.present = pdusession_failed->cause; - switch (pdusessionUnTransfer_p.cause.present) { + switch(pdusession_failed->cause) { case NGAP_CAUSE_RADIO_NETWORK: + pdusessionUnTransfer_p.cause.present = NGAP_Cause_PR_radioNetwork; pdusessionUnTransfer_p.cause.choice.radioNetwork = pdusession_failed->cause_value; break; case NGAP_CAUSE_TRANSPORT: + pdusessionUnTransfer_p.cause.present = NGAP_Cause_PR_transport; pdusessionUnTransfer_p.cause.choice.transport = pdusession_failed->cause_value; break; case NGAP_CAUSE_NAS: + pdusessionUnTransfer_p.cause.present = NGAP_Cause_PR_nas; pdusessionUnTransfer_p.cause.choice.nas = pdusession_failed->cause_value; break; case NGAP_CAUSE_PROTOCOL: + pdusessionUnTransfer_p.cause.present = NGAP_Cause_PR_protocol; pdusessionUnTransfer_p.cause.choice.protocol = pdusession_failed->cause_value; break; case NGAP_CAUSE_MISC: + pdusessionUnTransfer_p.cause.present = NGAP_Cause_PR_misc; pdusessionUnTransfer_p.cause.choice.misc = pdusession_failed->cause_value; break; @@ -954,7 +962,6 @@ int ngap_gNB_pdusession_setup_resp(instance_t instance, ngap_pdusession_setup_re default: break; } - NGAP_DEBUG("pdusession setup response: failed pdusession ID %ld\n", item->pDUSessionID); asn_encode_to_new_buffer_result_t res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_PDUSessionResourceSetupUnsuccessfulTransfer, &pdusessionUnTransfer_p); @@ -1087,26 +1094,30 @@ int ngap_gNB_pdusession_modify_resp(instance_t instance, ngap_pdusession_modify_ item->pDUSessionID = pdusession_modify_resp_p->pdusessions_failed[i].pdusession_id; NGAP_PDUSessionResourceModifyUnsuccessfulTransfer_t pdusessionTransfer = {0}; - pdusessionTransfer.cause.present = pdusession_modify_resp_p->pdusessions_failed[i].cause; - switch (pdusessionTransfer.cause.present) { + switch(pdusession_modify_resp_p->pdusessions_failed[i].cause) { case NGAP_CAUSE_RADIO_NETWORK: - pdusessionTransfer.cause.choice.radioNetwork = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; + pdusessionTransfer.cause.present = NGAP_Cause_PR_radioNetwork; + pdusessionTransfer.cause.choice.radioNetwork = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; break; case NGAP_CAUSE_TRANSPORT: + pdusessionTransfer.cause.present = NGAP_Cause_PR_transport; pdusessionTransfer.cause.choice.transport = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; break; case NGAP_CAUSE_NAS: + pdusessionTransfer.cause.present = NGAP_Cause_PR_nas; pdusessionTransfer.cause.choice.nas = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; break; case NGAP_CAUSE_PROTOCOL: + pdusessionTransfer.cause.present = NGAP_Cause_PR_protocol; pdusessionTransfer.cause.choice.protocol = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; break; case NGAP_CAUSE_MISC: + pdusessionTransfer.cause.present = NGAP_Cause_PR_misc; pdusessionTransfer.cause.choice.misc = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; break;