From 022916305cd6ffb478b7384fc6816d0e5a043aeb Mon Sep 17 00:00:00 2001 From: Robert Schmidt <robert.schmidt@eurecom.fr> Date: Tue, 12 Dec 2017 18:04:25 +0100 Subject: [PATCH] Fix multiple compilation warnings --- openair2/ENB_APP/enb_config.c | 4 ++-- openair2/ENB_APP/flexran_agent_net_comm.c | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 6282523b55..08de05c144 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -2009,7 +2009,7 @@ Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) enb_properties.properties[enb_properties_index]->rrc_report_amount = ReportConfigEUTRA__reportAmount_infinity; }else{ AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for report_amount choice: r1, r2, r4, r8, r16, r32, r64, infinity !\n", + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for report_amount choice: r1, r2, r4, r8, r16, r32, r64, infinity !\n", lib_config_file_name_pP, i,rrc_report_amount); } @@ -2041,7 +2041,7 @@ Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) enb_properties.properties[enb_properties_index]->rrc_report_interval = ReportInterval_min60; } else { AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for report_interval choice: 120ms, 240ms, 480ms, 640ms, 1024ms, 2048ms, 5120ms, 10240ms, 1min, 6min, 12", + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for report_interval choice: 120ms, 240ms, 480ms, 640ms, 1024ms, 2048ms, 5120ms, 10240ms, 1min, 6min, 12", lib_config_file_name_pP, i,rrc_report_interval); } diff --git a/openair2/ENB_APP/flexran_agent_net_comm.c b/openair2/ENB_APP/flexran_agent_net_comm.c index d801bbdda5..e5f9109871 100644 --- a/openair2/ENB_APP/flexran_agent_net_comm.c +++ b/openair2/ENB_APP/flexran_agent_net_comm.c @@ -141,9 +141,9 @@ int flexran_agent_destroy_channel(int channel_id) { for (i = 0; i < NUM_MAX_ENB; i++) { for (j = 0; j < FLEXRAN_AGENT_MAX; j++) { if (agent_channel[i][j] != NULL) { - if (agent_channel[i][j]->channel_id == e->channel_id) { - free(agent_channel[i][j]); - } + if (agent_channel[i][j]->channel_id == e->channel_id) { + free(agent_channel[i][j]); + } } } } @@ -164,7 +164,9 @@ err_code_t flexran_agent_init_channel_container(void) { for (i = 0; i < NUM_MAX_ENB; i++) { for (j = 0; j < FLEXRAN_AGENT_MAX; j++) { - agent_channel[i][j] = malloc(sizeof(flexran_agent_channel_t)); + agent_channel[i][j] = malloc(sizeof(flexran_agent_channel_t)); + if (!agent_channel[i][j]) + return -1; } } -- GitLab