[SBI] fix the compile warning in MacOSX

This commit is contained in:
Sukchan Lee 2021-05-05 22:04:17 +09:00
parent 0b063a57c8
commit e5a0dfb444
33 changed files with 66 additions and 58 deletions

View File

@ -146,9 +146,18 @@ static void *internal_realloc(void *pointer, size_t size)
#endif
#else
#include "ogs-core.h"
#define internal_malloc ogs_malloc
#define internal_free ogs_free
#define internal_realloc ogs_realloc
static void *internal_malloc(size_t size)
{
return ogs_malloc(size);
}
static void internal_free(void *pointer)
{
ogs_free(pointer);
}
static void *internal_realloc(void *pointer, size_t size)
{
return ogs_realloc(pointer, size);
}
#endif
static internal_hooks global_hooks = { internal_malloc, internal_free, internal_realloc };

View File

@ -386,7 +386,7 @@ cJSON *OpenAPI_{{classname}}_convertToJSON(OpenAPI_{{classname}}_t *{{classname}
OpenAPI_lnode_t *{{{name}}}_node;
if ({{{classname}}}->{{{name}}}) {
OpenAPI_list_for_each({{classname}}->{{{name}}}, {{{name}}}_node) {
cJSON *itemLocal = OpenAPI_{{complexType}}_convertToJSON({{#isEnum}}{{#items}}(OpenAPI_{{classVarName}}_{{name}}_e){{/items}}{{/isEnum}}{{{name}}}_node->data);
cJSON *itemLocal = OpenAPI_{{complexType}}_convertToJSON({{#isEnum}}{{#items}}(intptr_t){{/items}}{{/isEnum}}{{{name}}}_node->data);
if (itemLocal == NULL) {
ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
goto end;
@ -403,7 +403,7 @@ cJSON *OpenAPI_{{classname}}_convertToJSON(OpenAPI_{{classname}}_t *{{classname}
}
OpenAPI_lnode_t *{{{name}}}_node;
OpenAPI_list_for_each({{classname}}->{{{name}}}, {{{name}}}_node) {
if (cJSON_AddStringToObject({{{name}}}, "", OpenAPI_{{{complexType}}}_ToString((OpenAPI_{{{complexType}}}_e){{{name}}}_node->data)) == NULL) {
if (cJSON_AddStringToObject({{{name}}}, "", OpenAPI_{{{complexType}}}_ToString((intptr_t){{{name}}}_node->data)) == NULL) {
ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
goto end;
}

View File

@ -265,7 +265,7 @@ cJSON *OpenAPI_access_and_mobility_data_convertToJSON(OpenAPI_access_and_mobilit
}
OpenAPI_lnode_t *rat_type_node;
OpenAPI_list_for_each(access_and_mobility_data->rat_type, rat_type_node) {
if (cJSON_AddStringToObject(rat_type, "", OpenAPI_rat_type_ToString((OpenAPI_rat_type_e)rat_type_node->data)) == NULL) {
if (cJSON_AddStringToObject(rat_type, "", OpenAPI_rat_type_ToString((intptr_t)rat_type_node->data)) == NULL) {
ogs_error("OpenAPI_access_and_mobility_data_convertToJSON() failed [rat_type]");
goto end;
}

View File

@ -269,7 +269,7 @@ cJSON *OpenAPI_access_and_mobility_subscription_data_convertToJSON(OpenAPI_acces
}
OpenAPI_lnode_t *rat_restrictions_node;
OpenAPI_list_for_each(access_and_mobility_subscription_data->rat_restrictions, rat_restrictions_node) {
if (cJSON_AddStringToObject(rat_restrictions, "", OpenAPI_rat_type_ToString((OpenAPI_rat_type_e)rat_restrictions_node->data)) == NULL) {
if (cJSON_AddStringToObject(rat_restrictions, "", OpenAPI_rat_type_ToString((intptr_t)rat_restrictions_node->data)) == NULL) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [rat_restrictions]");
goto end;
}
@ -317,7 +317,7 @@ cJSON *OpenAPI_access_and_mobility_subscription_data_convertToJSON(OpenAPI_acces
}
OpenAPI_lnode_t *core_network_type_restrictions_node;
OpenAPI_list_for_each(access_and_mobility_subscription_data->core_network_type_restrictions, core_network_type_restrictions_node) {
if (cJSON_AddStringToObject(core_network_type_restrictions, "", OpenAPI_core_network_type_ToString((OpenAPI_core_network_type_e)core_network_type_restrictions_node->data)) == NULL) {
if (cJSON_AddStringToObject(core_network_type_restrictions, "", OpenAPI_core_network_type_ToString((intptr_t)core_network_type_restrictions_node->data)) == NULL) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [core_network_type_restrictions]");
goto end;
}
@ -401,7 +401,7 @@ cJSON *OpenAPI_access_and_mobility_subscription_data_convertToJSON(OpenAPI_acces
}
OpenAPI_lnode_t *sor_update_indicator_list_node;
OpenAPI_list_for_each(access_and_mobility_subscription_data->sor_update_indicator_list, sor_update_indicator_list_node) {
if (cJSON_AddStringToObject(sor_update_indicator_list, "", OpenAPI_sor_update_indicator_ToString((OpenAPI_sor_update_indicator_e)sor_update_indicator_list_node->data)) == NULL) {
if (cJSON_AddStringToObject(sor_update_indicator_list, "", OpenAPI_sor_update_indicator_ToString((intptr_t)sor_update_indicator_list_node->data)) == NULL) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [sor_update_indicator_list]");
goto end;
}
@ -596,7 +596,7 @@ cJSON *OpenAPI_access_and_mobility_subscription_data_convertToJSON(OpenAPI_acces
}
OpenAPI_lnode_t *primary_rat_restrictions_node;
OpenAPI_list_for_each(access_and_mobility_subscription_data->primary_rat_restrictions, primary_rat_restrictions_node) {
if (cJSON_AddStringToObject(primary_rat_restrictions, "", OpenAPI_rat_type_ToString((OpenAPI_rat_type_e)primary_rat_restrictions_node->data)) == NULL) {
if (cJSON_AddStringToObject(primary_rat_restrictions, "", OpenAPI_rat_type_ToString((intptr_t)primary_rat_restrictions_node->data)) == NULL) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [primary_rat_restrictions]");
goto end;
}
@ -611,7 +611,7 @@ cJSON *OpenAPI_access_and_mobility_subscription_data_convertToJSON(OpenAPI_acces
}
OpenAPI_lnode_t *secondary_rat_restrictions_node;
OpenAPI_list_for_each(access_and_mobility_subscription_data->secondary_rat_restrictions, secondary_rat_restrictions_node) {
if (cJSON_AddStringToObject(secondary_rat_restrictions, "", OpenAPI_rat_type_ToString((OpenAPI_rat_type_e)secondary_rat_restrictions_node->data)) == NULL) {
if (cJSON_AddStringToObject(secondary_rat_restrictions, "", OpenAPI_rat_type_ToString((intptr_t)secondary_rat_restrictions_node->data)) == NULL) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [secondary_rat_restrictions]");
goto end;
}

View File

@ -97,7 +97,7 @@ cJSON *OpenAPI_datalink_reporting_configuration_convertToJSON(OpenAPI_datalink_r
}
OpenAPI_lnode_t *ddd_status_list_node;
OpenAPI_list_for_each(datalink_reporting_configuration->ddd_status_list, ddd_status_list_node) {
if (cJSON_AddStringToObject(ddd_status_list, "", OpenAPI_dl_data_delivery_status_ToString((OpenAPI_dl_data_delivery_status_e)ddd_status_list_node->data)) == NULL) {
if (cJSON_AddStringToObject(ddd_status_list, "", OpenAPI_dl_data_delivery_status_ToString((intptr_t)ddd_status_list_node->data)) == NULL) {
ogs_error("OpenAPI_datalink_reporting_configuration_convertToJSON() failed [ddd_status_list]");
goto end;
}

View File

@ -60,7 +60,7 @@ cJSON *OpenAPI_dnn_route_selection_descriptor_convertToJSON(OpenAPI_dnn_route_se
}
OpenAPI_lnode_t *ssc_modes_node;
OpenAPI_list_for_each(dnn_route_selection_descriptor->ssc_modes, ssc_modes_node) {
if (cJSON_AddStringToObject(ssc_modes, "", OpenAPI_ssc_mode_ToString((OpenAPI_ssc_mode_e)ssc_modes_node->data)) == NULL) {
if (cJSON_AddStringToObject(ssc_modes, "", OpenAPI_ssc_mode_ToString((intptr_t)ssc_modes_node->data)) == NULL) {
ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [ssc_modes]");
goto end;
}
@ -75,7 +75,7 @@ cJSON *OpenAPI_dnn_route_selection_descriptor_convertToJSON(OpenAPI_dnn_route_se
}
OpenAPI_lnode_t *pdu_sess_types_node;
OpenAPI_list_for_each(dnn_route_selection_descriptor->pdu_sess_types, pdu_sess_types_node) {
if (cJSON_AddStringToObject(pdu_sess_types, "", OpenAPI_pdu_session_type_ToString((OpenAPI_pdu_session_type_e)pdu_sess_types_node->data)) == NULL) {
if (cJSON_AddStringToObject(pdu_sess_types, "", OpenAPI_pdu_session_type_ToString((intptr_t)pdu_sess_types_node->data)) == NULL) {
ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [pdu_sess_types]");
goto end;
}

View File

@ -91,7 +91,7 @@ cJSON *OpenAPI_dnn_upf_info_item_convertToJSON(OpenAPI_dnn_upf_info_item_t *dnn_
}
OpenAPI_lnode_t *pdu_session_types_node;
OpenAPI_list_for_each(dnn_upf_info_item->pdu_session_types, pdu_session_types_node) {
if (cJSON_AddStringToObject(pdu_session_types, "", OpenAPI_pdu_session_type_ToString((OpenAPI_pdu_session_type_e)pdu_session_types_node->data)) == NULL) {
if (cJSON_AddStringToObject(pdu_session_types, "", OpenAPI_pdu_session_type_ToString((intptr_t)pdu_session_types_node->data)) == NULL) {
ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [pdu_session_types]");
goto end;
}

View File

@ -48,7 +48,7 @@ cJSON *OpenAPI_lcs_mo_data_convertToJSON(OpenAPI_lcs_mo_data_t *lcs_mo_data)
}
OpenAPI_lnode_t *allowed_service_classes_node;
OpenAPI_list_for_each(lcs_mo_data->allowed_service_classes, allowed_service_classes_node) {
if (cJSON_AddStringToObject(allowed_service_classes, "", OpenAPI_lcs_mo_service_class_ToString((OpenAPI_lcs_mo_service_class_e)allowed_service_classes_node->data)) == NULL) {
if (cJSON_AddStringToObject(allowed_service_classes, "", OpenAPI_lcs_mo_service_class_ToString((intptr_t)allowed_service_classes_node->data)) == NULL) {
ogs_error("OpenAPI_lcs_mo_data_convertToJSON() failed [allowed_service_classes]");
goto end;
}

View File

@ -87,7 +87,7 @@ cJSON *OpenAPI_lmf_info_convertToJSON(OpenAPI_lmf_info_t *lmf_info)
}
OpenAPI_lnode_t *serving_access_types_node;
OpenAPI_list_for_each(lmf_info->serving_access_types, serving_access_types_node) {
if (cJSON_AddStringToObject(serving_access_types, "", OpenAPI_access_type_ToString((OpenAPI_access_type_e)serving_access_types_node->data)) == NULL) {
if (cJSON_AddStringToObject(serving_access_types, "", OpenAPI_access_type_ToString((intptr_t)serving_access_types_node->data)) == NULL) {
ogs_error("OpenAPI_lmf_info_convertToJSON() failed [serving_access_types]");
goto end;
}
@ -102,7 +102,7 @@ cJSON *OpenAPI_lmf_info_convertToJSON(OpenAPI_lmf_info_t *lmf_info)
}
OpenAPI_lnode_t *serving_an_node_types_node;
OpenAPI_list_for_each(lmf_info->serving_an_node_types, serving_an_node_types_node) {
if (cJSON_AddStringToObject(serving_an_node_types, "", OpenAPI_an_node_type_ToString((OpenAPI_an_node_type_e)serving_an_node_types_node->data)) == NULL) {
if (cJSON_AddStringToObject(serving_an_node_types, "", OpenAPI_an_node_type_ToString((intptr_t)serving_an_node_types_node->data)) == NULL) {
ogs_error("OpenAPI_lmf_info_convertToJSON() failed [serving_an_node_types]");
goto end;
}
@ -117,7 +117,7 @@ cJSON *OpenAPI_lmf_info_convertToJSON(OpenAPI_lmf_info_t *lmf_info)
}
OpenAPI_lnode_t *serving_rat_types_node;
OpenAPI_list_for_each(lmf_info->serving_rat_types, serving_rat_types_node) {
if (cJSON_AddStringToObject(serving_rat_types, "", OpenAPI_rat_type_ToString((OpenAPI_rat_type_e)serving_rat_types_node->data)) == NULL) {
if (cJSON_AddStringToObject(serving_rat_types, "", OpenAPI_rat_type_ToString((intptr_t)serving_rat_types_node->data)) == NULL) {
ogs_error("OpenAPI_lmf_info_convertToJSON() failed [serving_rat_types]");
goto end;
}

View File

@ -141,7 +141,7 @@ cJSON *OpenAPI_mdt_configuration_convertToJSON(OpenAPI_mdt_configuration_t *mdt_
}
OpenAPI_lnode_t *measurement_lte_list_node;
OpenAPI_list_for_each(mdt_configuration->measurement_lte_list, measurement_lte_list_node) {
if (cJSON_AddStringToObject(measurement_lte_list, "", OpenAPI_measurement_lte_for_mdt_ToString((OpenAPI_measurement_lte_for_mdt_e)measurement_lte_list_node->data)) == NULL) {
if (cJSON_AddStringToObject(measurement_lte_list, "", OpenAPI_measurement_lte_for_mdt_ToString((intptr_t)measurement_lte_list_node->data)) == NULL) {
ogs_error("OpenAPI_mdt_configuration_convertToJSON() failed [measurement_lte_list]");
goto end;
}
@ -156,7 +156,7 @@ cJSON *OpenAPI_mdt_configuration_convertToJSON(OpenAPI_mdt_configuration_t *mdt_
}
OpenAPI_lnode_t *measurement_nr_list_node;
OpenAPI_list_for_each(mdt_configuration->measurement_nr_list, measurement_nr_list_node) {
if (cJSON_AddStringToObject(measurement_nr_list, "", OpenAPI_measurement_nr_for_mdt_ToString((OpenAPI_measurement_nr_for_mdt_e)measurement_nr_list_node->data)) == NULL) {
if (cJSON_AddStringToObject(measurement_nr_list, "", OpenAPI_measurement_nr_for_mdt_ToString((intptr_t)measurement_nr_list_node->data)) == NULL) {
ogs_error("OpenAPI_mdt_configuration_convertToJSON() failed [measurement_nr_list]");
goto end;
}
@ -171,7 +171,7 @@ cJSON *OpenAPI_mdt_configuration_convertToJSON(OpenAPI_mdt_configuration_t *mdt_
}
OpenAPI_lnode_t *sensor_measurement_list_node;
OpenAPI_list_for_each(mdt_configuration->sensor_measurement_list, sensor_measurement_list_node) {
if (cJSON_AddStringToObject(sensor_measurement_list, "", OpenAPI_sensor_measurement_ToString((OpenAPI_sensor_measurement_e)sensor_measurement_list_node->data)) == NULL) {
if (cJSON_AddStringToObject(sensor_measurement_list, "", OpenAPI_sensor_measurement_ToString((intptr_t)sensor_measurement_list_node->data)) == NULL) {
ogs_error("OpenAPI_mdt_configuration_convertToJSON() failed [sensor_measurement_list]");
goto end;
}
@ -186,7 +186,7 @@ cJSON *OpenAPI_mdt_configuration_convertToJSON(OpenAPI_mdt_configuration_t *mdt_
}
OpenAPI_lnode_t *reporting_trigger_list_node;
OpenAPI_list_for_each(mdt_configuration->reporting_trigger_list, reporting_trigger_list_node) {
if (cJSON_AddStringToObject(reporting_trigger_list, "", OpenAPI_reporting_trigger_ToString((OpenAPI_reporting_trigger_e)reporting_trigger_list_node->data)) == NULL) {
if (cJSON_AddStringToObject(reporting_trigger_list, "", OpenAPI_reporting_trigger_ToString((intptr_t)reporting_trigger_list_node->data)) == NULL) {
ogs_error("OpenAPI_mdt_configuration_convertToJSON() failed [reporting_trigger_list]");
goto end;
}
@ -250,7 +250,7 @@ cJSON *OpenAPI_mdt_configuration_convertToJSON(OpenAPI_mdt_configuration_t *mdt_
}
OpenAPI_lnode_t *event_list_node;
OpenAPI_list_for_each(mdt_configuration->event_list, event_list_node) {
if (cJSON_AddStringToObject(event_list, "", OpenAPI_event_for_mdt_ToString((OpenAPI_event_for_mdt_e)event_list_node->data)) == NULL) {
if (cJSON_AddStringToObject(event_list, "", OpenAPI_event_for_mdt_ToString((intptr_t)event_list_node->data)) == NULL) {
ogs_error("OpenAPI_mdt_configuration_convertToJSON() failed [event_list]");
goto end;
}

View File

@ -86,7 +86,7 @@ cJSON *OpenAPI_model_5_g_vn_group_data_convertToJSON(OpenAPI_model_5_g_vn_group_
}
OpenAPI_lnode_t *pdu_session_types_node;
OpenAPI_list_for_each(model_5_g_vn_group_data->pdu_session_types, pdu_session_types_node) {
if (cJSON_AddStringToObject(pdu_session_types, "", OpenAPI_pdu_session_type_ToString((OpenAPI_pdu_session_type_e)pdu_session_types_node->data)) == NULL) {
if (cJSON_AddStringToObject(pdu_session_types, "", OpenAPI_pdu_session_type_ToString((intptr_t)pdu_session_types_node->data)) == NULL) {
ogs_error("OpenAPI_model_5_g_vn_group_data_convertToJSON() failed [pdu_session_types]");
goto end;
}

View File

@ -578,7 +578,7 @@ cJSON *OpenAPI_nf_profile_convertToJSON(OpenAPI_nf_profile_t *nf_profile)
}
OpenAPI_lnode_t *allowed_nf_types_node;
OpenAPI_list_for_each(nf_profile->allowed_nf_types, allowed_nf_types_node) {
if (cJSON_AddStringToObject(allowed_nf_types, "", OpenAPI_nf_type_ToString((OpenAPI_nf_type_e)allowed_nf_types_node->data)) == NULL) {
if (cJSON_AddStringToObject(allowed_nf_types, "", OpenAPI_nf_type_ToString((intptr_t)allowed_nf_types_node->data)) == NULL) {
ogs_error("OpenAPI_nf_profile_convertToJSON() failed [allowed_nf_types]");
goto end;
}

View File

@ -330,7 +330,7 @@ cJSON *OpenAPI_nf_service_convertToJSON(OpenAPI_nf_service_t *nf_service)
}
OpenAPI_lnode_t *allowed_nf_types_node;
OpenAPI_list_for_each(nf_service->allowed_nf_types, allowed_nf_types_node) {
if (cJSON_AddStringToObject(allowed_nf_types, "", OpenAPI_nf_type_ToString((OpenAPI_nf_type_e)allowed_nf_types_node->data)) == NULL) {
if (cJSON_AddStringToObject(allowed_nf_types, "", OpenAPI_nf_type_ToString((intptr_t)allowed_nf_types_node->data)) == NULL) {
ogs_error("OpenAPI_nf_service_convertToJSON() failed [allowed_nf_types]");
goto end;
}

View File

@ -82,7 +82,7 @@ cJSON *OpenAPI_non_ue_n2_info_subscription_create_data_convertToJSON(OpenAPI_non
}
OpenAPI_lnode_t *an_type_list_node;
OpenAPI_list_for_each(non_ue_n2_info_subscription_create_data->an_type_list, an_type_list_node) {
if (cJSON_AddStringToObject(an_type_list, "", OpenAPI_access_type_ToString((OpenAPI_access_type_e)an_type_list_node->data)) == NULL) {
if (cJSON_AddStringToObject(an_type_list, "", OpenAPI_access_type_ToString((intptr_t)an_type_list_node->data)) == NULL) {
ogs_error("OpenAPI_non_ue_n2_info_subscription_create_data_convertToJSON() failed [an_type_list]");
goto end;
}

View File

@ -66,7 +66,7 @@ cJSON *OpenAPI_pcscf_info_convertToJSON(OpenAPI_pcscf_info_t *pcscf_info)
}
OpenAPI_lnode_t *access_type_node;
OpenAPI_list_for_each(pcscf_info->access_type, access_type_node) {
if (cJSON_AddStringToObject(access_type, "", OpenAPI_access_type_ToString((OpenAPI_access_type_e)access_type_node->data)) == NULL) {
if (cJSON_AddStringToObject(access_type, "", OpenAPI_access_type_ToString((intptr_t)access_type_node->data)) == NULL) {
ogs_error("OpenAPI_pcscf_info_convertToJSON() failed [access_type]");
goto end;
}

View File

@ -56,7 +56,7 @@ cJSON *OpenAPI_pdu_session_types_convertToJSON(OpenAPI_pdu_session_types_t *pdu_
}
OpenAPI_lnode_t *allowed_session_types_node;
OpenAPI_list_for_each(pdu_session_types->allowed_session_types, allowed_session_types_node) {
if (cJSON_AddStringToObject(allowed_session_types, "", OpenAPI_pdu_session_type_ToString((OpenAPI_pdu_session_type_e)allowed_session_types_node->data)) == NULL) {
if (cJSON_AddStringToObject(allowed_session_types, "", OpenAPI_pdu_session_type_ToString((intptr_t)allowed_session_types_node->data)) == NULL) {
ogs_error("OpenAPI_pdu_session_types_convertToJSON() failed [allowed_session_types]");
goto end;
}

View File

@ -89,7 +89,7 @@ cJSON *OpenAPI_policy_association_convertToJSON(OpenAPI_policy_association_t *po
}
OpenAPI_lnode_t *triggers_node;
OpenAPI_list_for_each(policy_association->triggers, triggers_node) {
if (cJSON_AddStringToObject(triggers, "", OpenAPI_request_trigger_ToString((OpenAPI_request_trigger_e)triggers_node->data)) == NULL) {
if (cJSON_AddStringToObject(triggers, "", OpenAPI_request_trigger_ToString((intptr_t)triggers_node->data)) == NULL) {
ogs_error("OpenAPI_policy_association_convertToJSON() failed [triggers]");
goto end;
}

View File

@ -199,7 +199,7 @@ cJSON *OpenAPI_policy_association_request_convertToJSON(OpenAPI_policy_associati
}
OpenAPI_lnode_t *access_types_node;
OpenAPI_list_for_each(policy_association_request->access_types, access_types_node) {
if (cJSON_AddStringToObject(access_types, "", OpenAPI_access_type_ToString((OpenAPI_access_type_e)access_types_node->data)) == NULL) {
if (cJSON_AddStringToObject(access_types, "", OpenAPI_access_type_ToString((intptr_t)access_types_node->data)) == NULL) {
ogs_error("OpenAPI_policy_association_request_convertToJSON() failed [access_types]");
goto end;
}
@ -261,7 +261,7 @@ cJSON *OpenAPI_policy_association_request_convertToJSON(OpenAPI_policy_associati
}
OpenAPI_lnode_t *rat_types_node;
OpenAPI_list_for_each(policy_association_request->rat_types, rat_types_node) {
if (cJSON_AddStringToObject(rat_types, "", OpenAPI_rat_type_ToString((OpenAPI_rat_type_e)rat_types_node->data)) == NULL) {
if (cJSON_AddStringToObject(rat_types, "", OpenAPI_rat_type_ToString((intptr_t)rat_types_node->data)) == NULL) {
ogs_error("OpenAPI_policy_association_request_convertToJSON() failed [rat_types]");
goto end;
}

View File

@ -157,7 +157,7 @@ cJSON *OpenAPI_policy_association_update_request_convertToJSON(OpenAPI_policy_as
}
OpenAPI_lnode_t *triggers_node;
OpenAPI_list_for_each(policy_association_update_request->triggers, triggers_node) {
if (cJSON_AddStringToObject(triggers, "", OpenAPI_request_trigger_ToString((OpenAPI_request_trigger_e)triggers_node->data)) == NULL) {
if (cJSON_AddStringToObject(triggers, "", OpenAPI_request_trigger_ToString((intptr_t)triggers_node->data)) == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [triggers]");
goto end;
}
@ -318,7 +318,7 @@ cJSON *OpenAPI_policy_association_update_request_convertToJSON(OpenAPI_policy_as
}
OpenAPI_lnode_t *access_types_node;
OpenAPI_list_for_each(policy_association_update_request->access_types, access_types_node) {
if (cJSON_AddStringToObject(access_types, "", OpenAPI_access_type_ToString((OpenAPI_access_type_e)access_types_node->data)) == NULL) {
if (cJSON_AddStringToObject(access_types, "", OpenAPI_access_type_ToString((intptr_t)access_types_node->data)) == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [access_types]");
goto end;
}
@ -333,7 +333,7 @@ cJSON *OpenAPI_policy_association_update_request_convertToJSON(OpenAPI_policy_as
}
OpenAPI_lnode_t *rat_types_node;
OpenAPI_list_for_each(policy_association_update_request->rat_types, rat_types_node) {
if (cJSON_AddStringToObject(rat_types, "", OpenAPI_rat_type_ToString((OpenAPI_rat_type_e)rat_types_node->data)) == NULL) {
if (cJSON_AddStringToObject(rat_types, "", OpenAPI_rat_type_ToString((intptr_t)rat_types_node->data)) == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [rat_types]");
goto end;
}

View File

@ -82,7 +82,7 @@ cJSON *OpenAPI_policy_update_convertToJSON(OpenAPI_policy_update_t *policy_updat
}
OpenAPI_lnode_t *triggers_node;
OpenAPI_list_for_each(policy_update->triggers, triggers_node) {
if (cJSON_AddStringToObject(triggers, "", OpenAPI_request_trigger_ToString((OpenAPI_request_trigger_e)triggers_node->data)) == NULL) {
if (cJSON_AddStringToObject(triggers, "", OpenAPI_request_trigger_ToString((intptr_t)triggers_node->data)) == NULL) {
ogs_error("OpenAPI_policy_update_convertToJSON() failed [triggers]");
goto end;
}

View File

@ -76,7 +76,7 @@ cJSON *OpenAPI_qos_monitoring_data_convertToJSON(OpenAPI_qos_monitoring_data_t *
}
OpenAPI_lnode_t *req_qos_mon_params_node;
OpenAPI_list_for_each(qos_monitoring_data->req_qos_mon_params, req_qos_mon_params_node) {
if (cJSON_AddStringToObject(req_qos_mon_params, "", OpenAPI_requested_qos_monitoring_parameter_ToString((OpenAPI_requested_qos_monitoring_parameter_e)req_qos_mon_params_node->data)) == NULL) {
if (cJSON_AddStringToObject(req_qos_mon_params, "", OpenAPI_requested_qos_monitoring_parameter_ToString((intptr_t)req_qos_mon_params_node->data)) == NULL) {
ogs_error("OpenAPI_qos_monitoring_data_convertToJSON() failed [req_qos_mon_params]");
goto end;
}
@ -91,7 +91,7 @@ cJSON *OpenAPI_qos_monitoring_data_convertToJSON(OpenAPI_qos_monitoring_data_t *
}
OpenAPI_lnode_t *rep_freqs_node;
OpenAPI_list_for_each(qos_monitoring_data->rep_freqs, rep_freqs_node) {
if (cJSON_AddStringToObject(rep_freqs, "", OpenAPI_reporting_frequency_ToString((OpenAPI_reporting_frequency_e)rep_freqs_node->data)) == NULL) {
if (cJSON_AddStringToObject(rep_freqs, "", OpenAPI_reporting_frequency_ToString((intptr_t)rep_freqs_node->data)) == NULL) {
ogs_error("OpenAPI_qos_monitoring_data_convertToJSON() failed [rep_freqs]");
goto end;
}

View File

@ -92,7 +92,7 @@ cJSON *OpenAPI_registration_location_info_convertToJSON(OpenAPI_registration_loc
}
OpenAPI_lnode_t *access_type_list_node;
OpenAPI_list_for_each(registration_location_info->access_type_list, access_type_list_node) {
if (cJSON_AddStringToObject(access_type_list, "", OpenAPI_access_type_ToString((OpenAPI_access_type_e)access_type_list_node->data)) == NULL) {
if (cJSON_AddStringToObject(access_type_list, "", OpenAPI_access_type_ToString((intptr_t)access_type_list_node->data)) == NULL) {
ogs_error("OpenAPI_registration_location_info_convertToJSON() failed [access_type_list]");
goto end;
}

View File

@ -72,7 +72,7 @@ cJSON *OpenAPI_requested_rule_data_convertToJSON(OpenAPI_requested_rule_data_t *
}
OpenAPI_lnode_t *req_data_node;
OpenAPI_list_for_each(requested_rule_data->req_data, req_data_node) {
if (cJSON_AddStringToObject(req_data, "", OpenAPI_requested_rule_data_type_ToString((OpenAPI_requested_rule_data_type_e)req_data_node->data)) == NULL) {
if (cJSON_AddStringToObject(req_data, "", OpenAPI_requested_rule_data_type_ToString((intptr_t)req_data_node->data)) == NULL) {
ogs_error("OpenAPI_requested_rule_data_convertToJSON() failed [req_data]");
goto end;
}

View File

@ -405,7 +405,7 @@ cJSON *OpenAPI_sm_policy_decision_convertToJSON(OpenAPI_sm_policy_decision_t *sm
}
OpenAPI_lnode_t *policy_ctrl_req_triggers_node;
OpenAPI_list_for_each(sm_policy_decision->policy_ctrl_req_triggers, policy_ctrl_req_triggers_node) {
if (cJSON_AddStringToObject(policy_ctrl_req_triggers, "", OpenAPI_policy_control_request_trigger_ToString((OpenAPI_policy_control_request_trigger_e)policy_ctrl_req_triggers_node->data)) == NULL) {
if (cJSON_AddStringToObject(policy_ctrl_req_triggers, "", OpenAPI_policy_control_request_trigger_ToString((intptr_t)policy_ctrl_req_triggers_node->data)) == NULL) {
ogs_error("OpenAPI_sm_policy_decision_convertToJSON() failed [policy_ctrl_req_triggers]");
goto end;
}

View File

@ -195,7 +195,7 @@ cJSON *OpenAPI_sm_policy_update_context_data_convertToJSON(OpenAPI_sm_policy_upd
}
OpenAPI_lnode_t *rep_policy_ctrl_req_triggers_node;
OpenAPI_list_for_each(sm_policy_update_context_data->rep_policy_ctrl_req_triggers, rep_policy_ctrl_req_triggers_node) {
if (cJSON_AddStringToObject(rep_policy_ctrl_req_triggers, "", OpenAPI_policy_control_request_trigger_ToString((OpenAPI_policy_control_request_trigger_e)rep_policy_ctrl_req_triggers_node->data)) == NULL) {
if (cJSON_AddStringToObject(rep_policy_ctrl_req_triggers, "", OpenAPI_policy_control_request_trigger_ToString((intptr_t)rep_policy_ctrl_req_triggers_node->data)) == NULL) {
ogs_error("OpenAPI_sm_policy_update_context_data_convertToJSON() failed [rep_policy_ctrl_req_triggers]");
goto end;
}

View File

@ -139,7 +139,7 @@ cJSON *OpenAPI_smf_info_convertToJSON(OpenAPI_smf_info_t *smf_info)
}
OpenAPI_lnode_t *access_type_node;
OpenAPI_list_for_each(smf_info->access_type, access_type_node) {
if (cJSON_AddStringToObject(access_type, "", OpenAPI_access_type_ToString((OpenAPI_access_type_e)access_type_node->data)) == NULL) {
if (cJSON_AddStringToObject(access_type, "", OpenAPI_access_type_ToString((intptr_t)access_type_node->data)) == NULL) {
ogs_error("OpenAPI_smf_info_convertToJSON() failed [access_type]");
goto end;
}

View File

@ -56,7 +56,7 @@ cJSON *OpenAPI_ssc_modes_convertToJSON(OpenAPI_ssc_modes_t *ssc_modes)
}
OpenAPI_lnode_t *allowed_ssc_modes_node;
OpenAPI_list_for_each(ssc_modes->allowed_ssc_modes, allowed_ssc_modes_node) {
if (cJSON_AddStringToObject(allowed_ssc_modes, "", OpenAPI_ssc_mode_ToString((OpenAPI_ssc_mode_e)allowed_ssc_modes_node->data)) == NULL) {
if (cJSON_AddStringToObject(allowed_ssc_modes, "", OpenAPI_ssc_mode_ToString((intptr_t)allowed_ssc_modes_node->data)) == NULL) {
ogs_error("OpenAPI_ssc_modes_convertToJSON() failed [allowed_ssc_modes]");
goto end;
}

View File

@ -147,7 +147,7 @@ cJSON *OpenAPI_subscription_data_convertToJSON(OpenAPI_subscription_data_t *subs
}
OpenAPI_lnode_t *req_notif_events_node;
OpenAPI_list_for_each(subscription_data->req_notif_events, req_notif_events_node) {
if (cJSON_AddStringToObject(req_notif_events, "", OpenAPI_notification_event_type_ToString((OpenAPI_notification_event_type_e)req_notif_events_node->data)) == NULL) {
if (cJSON_AddStringToObject(req_notif_events, "", OpenAPI_notification_event_type_ToString((intptr_t)req_notif_events_node->data)) == NULL) {
ogs_error("OpenAPI_subscription_data_convertToJSON() failed [req_notif_events]");
goto end;
}

View File

@ -370,7 +370,7 @@ cJSON *OpenAPI_ue_context_convertToJSON(OpenAPI_ue_context_t *ue_context)
}
OpenAPI_lnode_t *am_policy_req_trigger_list_node;
OpenAPI_list_for_each(ue_context->am_policy_req_trigger_list, am_policy_req_trigger_list_node) {
if (cJSON_AddStringToObject(am_policy_req_trigger_list, "", OpenAPI_policy_req_trigger_ToString((OpenAPI_policy_req_trigger_e)am_policy_req_trigger_list_node->data)) == NULL) {
if (cJSON_AddStringToObject(am_policy_req_trigger_list, "", OpenAPI_policy_req_trigger_ToString((intptr_t)am_policy_req_trigger_list_node->data)) == NULL) {
ogs_error("OpenAPI_ue_context_convertToJSON() failed [am_policy_req_trigger_list]");
goto end;
}
@ -392,7 +392,7 @@ cJSON *OpenAPI_ue_context_convertToJSON(OpenAPI_ue_context_t *ue_context)
}
OpenAPI_lnode_t *ue_policy_req_trigger_list_node;
OpenAPI_list_for_each(ue_context->ue_policy_req_trigger_list, ue_policy_req_trigger_list_node) {
if (cJSON_AddStringToObject(ue_policy_req_trigger_list, "", OpenAPI_policy_req_trigger_ToString((OpenAPI_policy_req_trigger_e)ue_policy_req_trigger_list_node->data)) == NULL) {
if (cJSON_AddStringToObject(ue_policy_req_trigger_list, "", OpenAPI_policy_req_trigger_ToString((intptr_t)ue_policy_req_trigger_list_node->data)) == NULL) {
ogs_error("OpenAPI_ue_context_convertToJSON() failed [ue_policy_req_trigger_list]");
goto end;
}
@ -414,7 +414,7 @@ cJSON *OpenAPI_ue_context_convertToJSON(OpenAPI_ue_context_t *ue_context)
}
OpenAPI_lnode_t *restricted_rat_list_node;
OpenAPI_list_for_each(ue_context->restricted_rat_list, restricted_rat_list_node) {
if (cJSON_AddStringToObject(restricted_rat_list, "", OpenAPI_rat_type_ToString((OpenAPI_rat_type_e)restricted_rat_list_node->data)) == NULL) {
if (cJSON_AddStringToObject(restricted_rat_list, "", OpenAPI_rat_type_ToString((intptr_t)restricted_rat_list_node->data)) == NULL) {
ogs_error("OpenAPI_ue_context_convertToJSON() failed [restricted_rat_list]");
goto end;
}
@ -462,7 +462,7 @@ cJSON *OpenAPI_ue_context_convertToJSON(OpenAPI_ue_context_t *ue_context)
}
OpenAPI_lnode_t *restricted_core_nw_type_list_node;
OpenAPI_list_for_each(ue_context->restricted_core_nw_type_list, restricted_core_nw_type_list_node) {
if (cJSON_AddStringToObject(restricted_core_nw_type_list, "", OpenAPI_core_network_type_ToString((OpenAPI_core_network_type_e)restricted_core_nw_type_list_node->data)) == NULL) {
if (cJSON_AddStringToObject(restricted_core_nw_type_list, "", OpenAPI_core_network_type_ToString((intptr_t)restricted_core_nw_type_list_node->data)) == NULL) {
ogs_error("OpenAPI_ue_context_convertToJSON() failed [restricted_core_nw_type_list]");
goto end;
}
@ -610,7 +610,7 @@ cJSON *OpenAPI_ue_context_convertToJSON(OpenAPI_ue_context_t *ue_context)
}
OpenAPI_lnode_t *restricted_primary_rat_list_node;
OpenAPI_list_for_each(ue_context->restricted_primary_rat_list, restricted_primary_rat_list_node) {
if (cJSON_AddStringToObject(restricted_primary_rat_list, "", OpenAPI_rat_type_ToString((OpenAPI_rat_type_e)restricted_primary_rat_list_node->data)) == NULL) {
if (cJSON_AddStringToObject(restricted_primary_rat_list, "", OpenAPI_rat_type_ToString((intptr_t)restricted_primary_rat_list_node->data)) == NULL) {
ogs_error("OpenAPI_ue_context_convertToJSON() failed [restricted_primary_rat_list]");
goto end;
}
@ -625,7 +625,7 @@ cJSON *OpenAPI_ue_context_convertToJSON(OpenAPI_ue_context_t *ue_context)
}
OpenAPI_lnode_t *restricted_secondary_rat_list_node;
OpenAPI_list_for_each(ue_context->restricted_secondary_rat_list, restricted_secondary_rat_list_node) {
if (cJSON_AddStringToObject(restricted_secondary_rat_list, "", OpenAPI_rat_type_ToString((OpenAPI_rat_type_e)restricted_secondary_rat_list_node->data)) == NULL) {
if (cJSON_AddStringToObject(restricted_secondary_rat_list, "", OpenAPI_rat_type_ToString((intptr_t)restricted_secondary_rat_list_node->data)) == NULL) {
ogs_error("OpenAPI_ue_context_convertToJSON() failed [restricted_secondary_rat_list]");
goto end;
}

View File

@ -158,7 +158,7 @@ cJSON *OpenAPI_upf_info_convertToJSON(OpenAPI_upf_info_t *upf_info)
}
OpenAPI_lnode_t *pdu_session_types_node;
OpenAPI_list_for_each(upf_info->pdu_session_types, pdu_session_types_node) {
if (cJSON_AddStringToObject(pdu_session_types, "", OpenAPI_pdu_session_type_ToString((OpenAPI_pdu_session_type_e)pdu_session_types_node->data)) == NULL) {
if (cJSON_AddStringToObject(pdu_session_types, "", OpenAPI_pdu_session_type_ToString((intptr_t)pdu_session_types_node->data)) == NULL) {
ogs_error("OpenAPI_upf_info_convertToJSON() failed [pdu_session_types]");
goto end;
}

View File

@ -96,8 +96,7 @@ int amf_npcf_am_policy_control_handle_create(
OpenAPI_list_for_each(PolicyAssociation->triggers, node) {
if (node->data) {
OpenAPI_request_trigger_e trigger =
(OpenAPI_request_trigger_e)node->data;
OpenAPI_request_trigger_e trigger = (intptr_t)node->data;
OpenAPI_ambr_t *UeAmbr = NULL;
switch (trigger) {

View File

@ -115,7 +115,7 @@ bool smf_npcf_smpolicycontrol_handle_create(
OpenAPI_list_for_each(SmPolicyDecision->policy_ctrl_req_triggers, node) {
if (node->data) {
OpenAPI_policy_control_request_trigger_e trigger_id =
(OpenAPI_policy_control_request_trigger_e)node->data;
(intptr_t)node->data;
ogs_assert(trigger_id < MAX_TRIGGER_ID);
trigger_results[trigger_id] = true;

View File

@ -248,12 +248,12 @@ static void sbi_message_test2(abts_case *tc, void *data)
entry = smf_info2->access_type->first;
ABTS_PTR_NOTNULL(tc, entry);
access_type = (OpenAPI_access_type_e)entry->data;
access_type = (intptr_t)entry->data;
ABTS_INT_EQUAL(tc, OpenAPI_access_type_3GPP_ACCESS, access_type);
entry = entry->next;
ABTS_PTR_NOTNULL(tc, entry);
access_type = (OpenAPI_access_type_e)entry->data;
access_type = (intptr_t)entry->data;
ABTS_INT_EQUAL(tc, OpenAPI_access_type_NON_3GPP_ACCESS, access_type);
OpenAPI_list_free(smf_info1->s_nssai_smf_info_list);