Fixed MacOSX compile error

This commit is contained in:
Sukchan Lee 2023-04-04 21:53:39 +09:00
parent e828f98bb6
commit 32019df0f0
32 changed files with 53 additions and 53 deletions

View File

@ -57,7 +57,7 @@ void ogs_app_context_final(void)
initialized = 0;
}
ogs_app_context_t *ogs_app()
ogs_app_context_t *ogs_app(void)
{
return &self;
}

View File

@ -66,7 +66,7 @@ static ogs_hash_entry_t **alloc_array(ogs_hash_t *ht, unsigned int max)
return ptr;
}
ogs_hash_t *ogs_hash_make()
ogs_hash_t *ogs_hash_make(void)
{
ogs_hash_t *ht;
ogs_time_t now = ogs_get_monotonic_time();

View File

@ -176,7 +176,7 @@ int ogs_dbi_init(const char *db_uri)
return OGS_OK;
}
void ogs_dbi_final()
void ogs_dbi_final(void)
{
if (self.collection.subscriber) {
mongoc_collection_destroy(self.collection.subscriber);

View File

@ -4944,7 +4944,7 @@ ifinfo_cmp(const void *a, const void *b)
* Returns 0 on success.
*/
static void
ipfw_list_tifaces()
ipfw_list_tifaces(void)
{
ipfw_obj_lheader *olh = NULL;
ipfw_iface_info *info;

View File

@ -1021,7 +1021,7 @@ ogs_sbi_nf_instance_t *ogs_sbi_nf_instance_find_by_service_type(
return nf_instance;
}
bool ogs_sbi_nf_instance_maximum_number_is_reached()
bool ogs_sbi_nf_instance_maximum_number_is_reached(void)
{
return nf_instance_pool.avail <= 0;
}

View File

@ -33,7 +33,7 @@ void ogs_sctp_init(uint16_t port)
usrsctp_sysctl_set_sctp_enable_sack_immediately(1);
}
void ogs_sctp_final()
void ogs_sctp_final(void)
{
while (usrsctp_finish() != 0) {
ogs_warn("try to finsih SCTP");

View File

@ -1203,7 +1203,7 @@ void amf_gnb_remove(amf_gnb_t *gnb)
ogs_list_count(&self.gnb_list));
}
void amf_gnb_remove_all()
void amf_gnb_remove_all(void)
{
amf_gnb_t *gnb = NULL, *next_gnb = NULL;
@ -1654,7 +1654,7 @@ void amf_ue_remove(amf_ue_t *amf_ue)
ogs_list_count(&self.amf_ue_list));
}
void amf_ue_remove_all()
void amf_ue_remove_all(void)
{
amf_ue_t *amf_ue = NULL, *next = NULL;;
@ -2368,13 +2368,13 @@ ogs_s_nssai_t *amf_find_s_nssai(
return NULL;
}
int amf_m_tmsi_pool_generate()
int amf_m_tmsi_pool_generate(void)
{
int i, j;
int j;
int index = 0;
ogs_trace("M-TMSI Pool try to generate...");
for (i = 0; index < ogs_app()->max.ue*2; i++) {
while (index < ogs_app()->max.ue*2) {
amf_m_tmsi_t *m_tmsi = NULL;
int conflict = 0;
@ -2406,7 +2406,7 @@ int amf_m_tmsi_pool_generate()
return OGS_OK;
}
amf_m_tmsi_t *amf_m_tmsi_alloc()
amf_m_tmsi_t *amf_m_tmsi_alloc(void)
{
amf_m_tmsi_t *m_tmsi = NULL;
@ -2488,7 +2488,7 @@ static void stats_remove_ran_ue(void)
ogs_info("[Removed] Number of gNB-UEs is now %d", num_of_ran_ue);
}
int get_ran_ue_load()
int get_ran_ue_load(void)
{
return (((ogs_pool_size(&ran_ue_pool) -
ogs_pool_avail(&ran_ue_pool)) * 100) /

View File

@ -25,7 +25,7 @@ static ogs_thread_t *thread;
static void amf_main(void *data);
static int initialized = 0;
int amf_initialize()
int amf_initialize(void)
{
int rv;

View File

@ -40,7 +40,7 @@ int ngap_open(void)
return OGS_OK;
}
void ngap_close()
void ngap_close(void)
{
ogs_socknode_remove_all(&amf_self()->ngap_list);
ogs_socknode_remove_all(&amf_self()->ngap_list6);

View File

@ -183,7 +183,7 @@ void ausf_ue_remove(ausf_ue_t *ausf_ue)
ogs_pool_free(&ausf_ue_pool, ausf_ue);
}
void ausf_ue_remove_all()
void ausf_ue_remove_all(void)
{
ausf_ue_t *ausf_ue = NULL, *next = NULL;;
@ -223,7 +223,7 @@ ausf_ue_t *ausf_ue_cycle(ausf_ue_t *ausf_ue)
return ogs_pool_cycle(&ausf_ue_pool, ausf_ue);
}
int get_ue_load()
int get_ue_load(void)
{
return (((ogs_pool_size(&ausf_ue_pool) -
ogs_pool_avail(&ausf_ue_pool)) * 100) /

View File

@ -23,7 +23,7 @@ static ogs_thread_t *thread;
static void ausf_main(void *data);
static int initialized = 0;
int ausf_initialize()
int ausf_initialize(void)
{
int rv;

View File

@ -341,7 +341,7 @@ bsf_sess_t *bsf_sess_find_by_ipv6prefix(char *ipv6prefix_string)
&ipv6prefix, (ipv6prefix.len >> 3) + 1);
}
int get_sess_load()
int get_sess_load(void)
{
return (((ogs_pool_size(&bsf_sess_pool) -
ogs_pool_avail(&bsf_sess_pool)) * 100) /

View File

@ -25,7 +25,7 @@ static void bsf_main(void *data);
static int initialized = 0;
int bsf_initialize()
int bsf_initialize(void)
{
int rv;

View File

@ -63,7 +63,7 @@ static bool compare_ue_info(mme_sgw_t *node, enb_ue_t *enb_ue);
static mme_sgw_t *selected_sgw_node(mme_sgw_t *current, enb_ue_t *enb_ue);
static mme_sgw_t *changed_sgw_node(mme_sgw_t *current, enb_ue_t *enb_ue);
void mme_context_init()
void mme_context_init(void)
{
ogs_assert(context_initialized == 0);
@ -120,7 +120,7 @@ void mme_context_init()
context_initialized = 1;
}
void mme_context_final()
void mme_context_final(void)
{
ogs_assert(context_initialized == 1);
@ -270,7 +270,7 @@ static int mme_context_validation(void)
return OGS_OK;
}
int mme_context_parse_config()
int mme_context_parse_config(void)
{
int rv;
yaml_document_t *document = NULL;
@ -1812,7 +1812,7 @@ void mme_sgw_remove(mme_sgw_t *sgw)
ogs_pool_free(&mme_sgw_pool, sgw);
}
void mme_sgw_remove_all()
void mme_sgw_remove_all(void)
{
mme_sgw_t *sgw = NULL, *next_sgw = NULL;
@ -1861,7 +1861,7 @@ void mme_pgw_remove(mme_pgw_t *pgw)
ogs_pool_free(&mme_pgw_pool, pgw);
}
void mme_pgw_remove_all()
void mme_pgw_remove_all(void)
{
mme_pgw_t *pgw = NULL, *next_pgw = NULL;
@ -1930,7 +1930,7 @@ void mme_vlr_remove(mme_vlr_t *vlr)
ogs_pool_free(&mme_vlr_pool, vlr);
}
void mme_vlr_remove_all()
void mme_vlr_remove_all(void)
{
mme_vlr_t *vlr = NULL, *next_vlr = NULL;
@ -2103,7 +2103,7 @@ int mme_enb_remove(mme_enb_t *enb)
return OGS_OK;
}
int mme_enb_remove_all()
int mme_enb_remove_all(void)
{
mme_enb_t *enb = NULL, *next_enb = NULL;
@ -3743,13 +3743,13 @@ int mme_find_served_tai(ogs_eps_tai_t *tai)
return -1;
}
int mme_m_tmsi_pool_generate()
int mme_m_tmsi_pool_generate(void)
{
int i, j;
int j;
int index = 0;
ogs_trace("M-TMSI Pool try to generate...");
for (i = 0; index < ogs_app()->max.ue*2; i++) {
while (index < ogs_app()->max.ue*2) {
mme_m_tmsi_t *m_tmsi = NULL;
int conflict = 0;
@ -3781,7 +3781,7 @@ int mme_m_tmsi_pool_generate()
return OGS_OK;
}
mme_m_tmsi_t *mme_m_tmsi_alloc()
mme_m_tmsi_t *mme_m_tmsi_alloc(void)
{
mme_m_tmsi_t *m_tmsi = NULL;

View File

@ -36,7 +36,7 @@ static void mme_main(void *data);
static int initialized = 0;
int mme_initialize()
int mme_initialize(void)
{
int rv;

View File

@ -41,7 +41,7 @@ int s1ap_open(void)
return OGS_OK;
}
void s1ap_close()
void s1ap_close(void)
{
ogs_socknode_remove_all(&mme_self()->s1ap_list);
ogs_socknode_remove_all(&mme_self()->s1ap_list6);

View File

@ -24,7 +24,7 @@
#include "sgsap-path.h"
int sgsap_open()
int sgsap_open(void)
{
mme_vlr_t *vlr = NULL;
@ -40,7 +40,7 @@ int sgsap_open()
return OGS_OK;
}
void sgsap_close()
void sgsap_close(void)
{
mme_vlr_t *vlr = NULL;

View File

@ -23,7 +23,7 @@ static ogs_thread_t *thread;
static void nrf_main(void *data);
static int initialized = 0;
int nrf_initialize()
int nrf_initialize(void)
{
int rv;

View File

@ -347,7 +347,7 @@ char *nssf_nsi_nrf_uri(nssf_nsi_t *nsi)
return ogs_uridup(ogs_app()->sbi.server.no_tls == false, nsi->addr, &h);
}
int get_nsi_load()
int get_nsi_load(void)
{
return (((ogs_pool_size(&nssf_nsi_pool) -
ogs_pool_avail(&nssf_nsi_pool)) * 100) /

View File

@ -23,7 +23,7 @@ static ogs_thread_t *thread;
static void nssf_main(void *data);
static int initialized = 0;
int nssf_initialize()
int nssf_initialize(void)
{
int rv;

View File

@ -214,7 +214,7 @@ void pcf_ue_remove(pcf_ue_t *pcf_ue)
ogs_pool_free(&pcf_ue_pool, pcf_ue);
}
void pcf_ue_remove_all()
void pcf_ue_remove_all(void)
{
pcf_ue_t *pcf_ue = NULL, *next = NULL;;
@ -595,7 +595,7 @@ pcf_app_t *pcf_app_find_by_app_session_id(char *app_session_id)
return pcf_app_find(atoll(app_session_id));
}
int get_pcf_load()
int get_pcf_load(void)
{
if (ogs_pool_avail(&pcf_ue_pool) / ogs_pool_size(&pcf_ue_pool) <
ogs_pool_avail(&pcf_sess_pool) /

View File

@ -24,7 +24,7 @@ static ogs_thread_t *thread;
static void pcf_main(void *data);
static int initialized = 0;
int pcf_initialize()
int pcf_initialize(void)
{
int rv;

View File

@ -25,7 +25,7 @@ static void scp_main(void *data);
static int initialized = 0;
int scp_initialize()
int scp_initialize(void)
{
int rv;

View File

@ -27,7 +27,7 @@ static void sgwc_main(void *data);
static int initialized = 0;
int sgwc_initialize()
int sgwc_initialize(void)
{
int rv;

View File

@ -26,7 +26,7 @@ static void sgwu_main(void *data);
static int initialized = 0;
int sgwu_initialize()
int sgwu_initialize(void)
{
int rv;

View File

@ -48,7 +48,7 @@ int smf_ctf_config_init(smf_ctf_config_t *ctf_config)
}
/* Shall Gy session be used according to policy and state? 1: yes, 0: no, -1: reject */
int smf_use_gy_iface()
int smf_use_gy_iface(void)
{
switch (smf_self()->ctf_config.enabled) {
case SMF_CTF_ENABLED_AUTO:
@ -3107,7 +3107,7 @@ static void stats_remove_smf_session(smf_sess_t *sess)
ogs_info("[Removed] Number of SMF-Sessions is now %d", num_of_smf_sess);
}
int get_sess_load()
int get_sess_load(void)
{
return (((ogs_pool_size(&smf_sess_pool) -
ogs_pool_avail(&smf_sess_pool)) * 100) /

View File

@ -29,7 +29,7 @@ static void smf_main(void *data);
static int initialized = 0;
int smf_initialize()
int smf_initialize(void)
{
int rv;

View File

@ -197,7 +197,7 @@ void udm_ue_remove(udm_ue_t *udm_ue)
ogs_pool_free(&udm_ue_pool, udm_ue);
}
void udm_ue_remove_all()
void udm_ue_remove_all(void)
{
udm_ue_t *udm_ue = NULL, *next = NULL;;
@ -237,7 +237,7 @@ udm_ue_t *udm_ue_cycle(udm_ue_t *udm_ue)
return ogs_pool_cycle(&udm_ue_pool, udm_ue);
}
int get_ue_load()
int get_ue_load(void)
{
return (((ogs_pool_size(&udm_ue_pool) -
ogs_pool_avail(&udm_ue_pool)) * 100) /

View File

@ -23,7 +23,7 @@ static ogs_thread_t *thread;
static void udm_main(void *data);
static int initialized = 0;
int udm_initialize()
int udm_initialize(void)
{
int rv;

View File

@ -23,7 +23,7 @@ static ogs_thread_t *thread;
static void udr_main(void *data);
static int initialized = 0;
int udr_initialize()
int udr_initialize(void)
{
int rv;

View File

@ -27,7 +27,7 @@ static void upf_main(void *data);
static int initialized = 0;
int upf_initialize()
int upf_initialize(void)
{
int rv;

View File

@ -25,7 +25,7 @@ static void af_main(void *data);
static int initialized = 0;
int af_initialize()
int af_initialize(void)
{
int rv;