From f83d602ea84055ef7563f7247228b76d0f4ba344 Mon Sep 17 00:00:00 2001 From: Lionel Gauthier <lionel.gauthier@eurecom.fr> Date: Thu, 9 Apr 2015 09:18:02 +0000 Subject: [PATCH] patches13/0015-fixed-some-compiler-warnings.patch git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7061 818b1a75-f10b-46b9-bf7c-635c3b92a50f --- openair-cn/GTPV1-U/gtpv1u_eNB.c | 2 +- openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c | 2 +- openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c | 1 - .../NAS/EURECOM-NAS/src/api/user/at_response.c | 2 +- .../NAS/EURECOM-NAS/src/emm/SecurityModeControl.c | 4 ++-- openair-cn/SCTP/sctp_eNB_task.c | 14 +++++++------- openair-cn/SECU/kdf.c | 2 +- openair-cn/SECU/nas_stream_eea1.c | 1 - openair-cn/SECU/secu_defs.h | 2 +- openair-cn/UDP/udp_eNB_task.c | 2 +- openair1/PHY/LTE_TRANSPORT/dlsch_coding.c | 2 -- openair1/SCHED/phy_procedures_lte_common.c | 3 ++- openair1/SCHED/phy_procedures_lte_eNb.c | 2 +- openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c | 12 +++++++----- openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c | 2 +- openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c | 12 ++++++------ openair2/RRC/LITE/rrc_eNB_S1AP.c | 4 ++-- openair2/UTIL/CLI/cli.h | 6 ++++-- openair2/UTIL/CLI/cli_cmd.c | 6 +++--- openair2/UTIL/OCG/OCG.c | 2 +- openair2/UTIL/OMG/mobility_parser.c | 3 +++ .../C/MIH_C_F1_basic_data_types_codec.c | 7 ++++--- .../RAL-LTE/LTE_RAL_ENB/SRC/lteRALenb_action.c | 10 +++++----- .../RAL-LTE/LTE_RAL_ENB/SRC/lteRALenb_process.c | 2 +- .../RAL-LTE/LTE_RAL_ENB/SRC/lteRALenb_rrc_msg.c | 6 +++--- targets/RT/USER/lte-ue.c | 4 ++-- 26 files changed, 60 insertions(+), 55 deletions(-) diff --git a/openair-cn/GTPV1-U/gtpv1u_eNB.c b/openair-cn/GTPV1-U/gtpv1u_eNB.c index 08405e26b..eb48ea4dd 100644 --- a/openair-cn/GTPV1-U/gtpv1u_eNB.c +++ b/openair-cn/GTPV1-U/gtpv1u_eNB.c @@ -640,7 +640,7 @@ gtpv1u_create_s1u_tunnel( hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS; int i; ebi_t eps_bearer_id = 0; - int ipv4_addr = 0; +// int ipv4_addr = 0; int ip_offset = 0; in_addr_t in_addr; int addrs_length_in_bytes= 0; diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c b/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c index a85b239dc..7caa30ebd 100644 --- a/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c +++ b/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c @@ -516,7 +516,7 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz, NwGtpv1uMsgHeaderT *msgHdr = NULL; NwGtpv1uTunnelEndPointT *pTunnelEndPoint = NULL; NwGtpv1uTunnelEndPointT tunnelEndPointKey; - NwU16T hdr_len = 0; +// NwU16T hdr_len = 0; #if defined(LOG_GTPU) && LOG_GTPU > 0 NW_ENTER(thiz); diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c b/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c index 9fa1b28b4..c8cc2899e 100644 --- a/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c +++ b/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c @@ -126,7 +126,6 @@ nwGtpv1uGpduMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, { NwGtpv1uStackT *pStack = (NwGtpv1uStackT *) hGtpuStackHandle; NwGtpv1uMsgT *pMsg; - NwU32T header_len = 0; NwU32T msgExtraLen = 0; if(gpGtpv1uMsgPool) { diff --git a/openair-cn/NAS/EURECOM-NAS/src/api/user/at_response.c b/openair-cn/NAS/EURECOM-NAS/src/api/user/at_response.c index 3ca6bbe2f..e936d855e 100644 --- a/openair-cn/NAS/EURECOM-NAS/src/api/user/at_response.c +++ b/openair-cn/NAS/EURECOM-NAS/src/api/user/at_response.c @@ -1049,7 +1049,7 @@ static int _at_response_encode_cgpaddr(char* buffer, const at_response_t* data) if (cgpaddr->PDP_addr_2[i] != NULL) { /* IPv6 Link-local address prefixe */ offset += sprintf(buffer+offset, - ",%hhu.%hhu.%hhu.%hhu.%hhu.%hhu.%hhu.%hhu", + ",%u.%u.%u.%u.%u.%u.%u.%u", 0xfe, 0x80, 0, 0, 0, 0, 0, 0); /* IPv6 Link-local address */ offset += sprintf(buffer+offset, diff --git a/openair-cn/NAS/EURECOM-NAS/src/emm/SecurityModeControl.c b/openair-cn/NAS/EURECOM-NAS/src/emm/SecurityModeControl.c index 9aa4a2cc5..ad0e540fb 100644 --- a/openair-cn/NAS/EURECOM-NAS/src/emm/SecurityModeControl.c +++ b/openair-cn/NAS/EURECOM-NAS/src/emm/SecurityModeControl.c @@ -863,8 +863,8 @@ static int _security_kenb(const OctetString *kasme, OctetString *kenb, * S = FC(0x11) || UL NAS Count || 0x00 0x04 */ UInt8_t input[32]; - UInt16_t length = 4; - int offset = 0; +// UInt16_t length = 4; +// int offset = 0; LOG_TRACE(INFO, "%s with count= %d", __FUNCTION__, count); memset(input, 0, 32); diff --git a/openair-cn/SCTP/sctp_eNB_task.c b/openair-cn/SCTP/sctp_eNB_task.c index 33e17d6bb..edaf24e73 100644 --- a/openair-cn/SCTP/sctp_eNB_task.c +++ b/openair-cn/SCTP/sctp_eNB_task.c @@ -125,7 +125,7 @@ sctp_handle_new_association_req( const sctp_new_association_req_t * const sctp_new_association_req_p) { int sd; - int32_t assoc_id; + int32_t assoc_id = 0; struct sctp_event_subscribe events; @@ -279,14 +279,14 @@ sctp_handle_new_association_req( &addr[address_index].sin_addr.s_addr) != 1) { SCTP_ERROR("Failed to convert ipv6 address %*s to network type\n", - strlen(sctp_new_association_req_p->remote_address.ipv6_address), + (int)strlen(sctp_new_association_req_p->remote_address.ipv6_address), sctp_new_association_req_p->remote_address.ipv6_address); close(sd); return; } SCTP_DEBUG("Converted ipv6 address %*s to network type\n", - strlen(sctp_new_association_req_p->remote_address.ipv6_address), + (int)strlen(sctp_new_association_req_p->remote_address.ipv6_address), sctp_new_association_req_p->remote_address.ipv6_address); addr[address_index].sin_family = AF_INET6; @@ -298,14 +298,14 @@ sctp_handle_new_association_req( &addr[address_index].sin_addr.s_addr) != 1) { SCTP_ERROR("Failed to convert ipv4 address %*s to network type\n", - strlen(sctp_new_association_req_p->remote_address.ipv4_address), + (int)strlen(sctp_new_association_req_p->remote_address.ipv4_address), sctp_new_association_req_p->remote_address.ipv4_address); close(sd); return; } SCTP_DEBUG("Converted ipv4 address %*s to network type\n", - strlen(sctp_new_association_req_p->remote_address.ipv4_address), + (int)strlen(sctp_new_association_req_p->remote_address.ipv4_address), sctp_new_association_req_p->remote_address.ipv4_address); addr[address_index].sin_family = AF_INET; @@ -349,7 +349,7 @@ sctp_handle_new_association_req( addr6.sin6_port = htons(sctp_new_association_req_p->port); if (bind(sd, (struct sockaddr*)&addr6, sizeof(addr6)) < 0) { - SCTP_ERROR("Failed to bind the socket %d to address any (v4/v6): %s\n", + SCTP_ERROR("Failed to bind the socket to address any (v4/v6): %s\n", strerror(errno)); close(sd); return; @@ -396,7 +396,7 @@ void sctp_send_data( } if (sctp_data_req_p->stream >= sctp_cnx->out_streams) { - SCTP_ERROR("Requested stream (%u) >= nb out streams\n", + SCTP_ERROR("Requested stream (%"PRIu16") >= nb out streams (%"PRIu16")\n", sctp_data_req_p->stream, sctp_cnx->out_streams); return; } diff --git a/openair-cn/SECU/kdf.c b/openair-cn/SECU/kdf.c index 0b0c6d978..4e5ac0348 100644 --- a/openair-cn/SECU/kdf.c +++ b/openair-cn/SECU/kdf.c @@ -35,7 +35,7 @@ #include "security_types.h" #include "secu_defs.h" -void kdf(uint8_t *key, uint16_t key_len, uint8_t *s, uint16_t s_len, uint8_t *out, +void kdf(const uint8_t *key, uint16_t key_len, uint8_t *s, uint16_t s_len, uint8_t *out, uint16_t out_len) { struct hmac_sha256_ctx ctx; diff --git a/openair-cn/SECU/nas_stream_eea1.c b/openair-cn/SECU/nas_stream_eea1.c index b99923722..d60925411 100755 --- a/openair-cn/SECU/nas_stream_eea1.c +++ b/openair-cn/SECU/nas_stream_eea1.c @@ -108,7 +108,6 @@ int nas_stream_encrypt_eea1(nas_stream_cipher_t *stream_cipher, uint8_t *out) stream_cipher->message[ceil_index - 1] = stream_cipher->message[ceil_index - 1] & (uint8_t)(0xFF << (8 - zero_bit)); } free(KS); - *out = stream_cipher->message; memcpy(out, stream_cipher->message, n*4); if (zero_bit > 0) { out[ceil_index - 1] = stream_cipher->message[ceil_index - 1]; diff --git a/openair-cn/SECU/secu_defs.h b/openair-cn/SECU/secu_defs.h index 3652cabbc..f2e4e23ce 100644 --- a/openair-cn/SECU/secu_defs.h +++ b/openair-cn/SECU/secu_defs.h @@ -42,7 +42,7 @@ #define SECU_DIRECTION_UPLINK 0 #define SECU_DIRECTION_DOWNLINK 1 -void kdf(uint8_t *key, +void kdf(const uint8_t *key, uint16_t key_len, uint8_t *s, uint16_t s_len, diff --git a/openair-cn/UDP/udp_eNB_task.c b/openair-cn/UDP/udp_eNB_task.c index 58b8a3d40..fd5ec88ee 100644 --- a/openair-cn/UDP/udp_eNB_task.c +++ b/openair-cn/UDP/udp_eNB_task.c @@ -167,7 +167,7 @@ int udp_eNB_create_socket(int port, char *ip_addr, task_id_t task_id) sin.sin_family = AF_INET; sin.sin_port = htons(port); if (ip_addr == NULL) { - sin.sin_addr.s_addr = inet_addr(INADDR_ANY); + sin.sin_addr.s_addr = INADDR_ANY; } else { sin.sin_addr.s_addr = inet_addr(ip_addr); } diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c index 3f9b4422a..1016fe047 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c @@ -81,7 +81,6 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) { msg("Freeing dlsch process %d b (%p)\n",i,dlsch->harq_processes[i]->b); #endif } - if (dlsch->harq_processes[i]->c) { #ifdef DEBUG_DLSCH_FREE msg("Freeing dlsch process %d c (%p)\n",i,dlsch->harq_processes[i]->c); #endif @@ -95,7 +94,6 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) { dlsch->harq_processes[i]->c[r] = NULL; } } - } free16(dlsch->harq_processes[i],sizeof(LTE_DL_eNB_HARQ_t)); dlsch->harq_processes[i] = NULL; } diff --git a/openair1/SCHED/phy_procedures_lte_common.c b/openair1/SCHED/phy_procedures_lte_common.c index 78298d9c9..d88433464 100755 --- a/openair1/SCHED/phy_procedures_lte_common.c +++ b/openair1/SCHED/phy_procedures_lte_common.c @@ -555,7 +555,8 @@ unsigned int is_phich_subframe(LTE_DL_FRAME_PARMS *frame_parms,unsigned char sub double aggregate_eNB_UE_localization_stats(PHY_VARS_eNB *phy_vars_eNB, int8_t UE_id, frame_t frame, sub_frame_t subframe, int32_t UE_tx_power_dB){ // parameters declaration int8_t Mod_id, CC_id; - int32_t harq_pid, avg_power, avg_rssi, median_power, median_rssi, median_subcarrier_rss, median_TA, median_TA_update, ref_timestamp_ms, current_timestamp_ms; +// int32_t harq_pid; + int32_t avg_power, avg_rssi, median_power, median_rssi, median_subcarrier_rss, median_TA, median_TA_update, ref_timestamp_ms, current_timestamp_ms; char cqis[100], sub_powers[2048]; int len = 0, i; struct timeval ts; diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 3c9605ead..00472ffb8 100755 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -2667,7 +2667,7 @@ void process_HARQ_feedback(uint8_t UE_id, // Clear NAK stats and adjust mcs offset // after measurement window timer expires - if ((ue_stats->dlsch_sliding_cnt == dlsch->ra_window_size) ) { + if (ue_stats->dlsch_sliding_cnt == dlsch->ra_window_size) { if ((ue_stats->dlsch_mcs_offset == 0) && (ue_stats->dlsch_NAK_round0 < 2)) ue_stats->dlsch_mcs_offset = 1; if ((ue_stats->dlsch_mcs_offset == 1) && (ue_stats->dlsch_NAK_round0 > 2)) diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c index cc6bc2065..234fc137b 100755 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c @@ -834,20 +834,22 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP) { unsigned char *otg_pkt=NULL; - module_id_t src_id, module_id; // src for otg + module_id_t src_id; // src for otg module_id_t dst_id; // dst for otg rb_id_t rb_id; signed long pkt_size=0; - static unsigned int pkt_cnt_enb=0, pkt_cnt_ue=0; - uint8_t pdcp_mode, is_ue=0; - Packet_otg_elt_t *otg_pkt_info=NULL; - int result; protocol_ctxt_t ctxt; src_id = ctxt_pP->enb_module_id; // we need to add conditions to avoid transmitting data when the UE is not RRC connected. #if defined(USER_MODE) && defined(OAI_EMU) + module_id_t module_id; + static unsigned int pkt_cnt_enb=0, pkt_cnt_ue=0; + uint8_t pdcp_mode, is_ue=0; + Packet_otg_elt_t *otg_pkt_info=NULL; + int result; + if (oai_emulation.info.otg_enabled ==1 ){ module_id = (ctxt_pP->enb_flag == 1) ? ctxt_pP->enb_module_id : ctxt_pP->ue_module_id+NB_eNB_INST; //rb_id = (ctxt_pP->enb_flag == 1) ? ctxt_pP->enb_module_id * MAX_NUM_RB + DTCH : (NB_eNB_INST + UE_index -1 ) * MAX_NUM_RB + DTCH ; diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c index 2e4b871ba..476dcbd6f 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c @@ -798,7 +798,7 @@ rlc_am_mac_data_indication ( ) { //----------------------------------------------------------------------------- - rlc_am_entity_t *l_rlc_p = (rlc_am_entity_t *) rlc_pP; +// rlc_am_entity_t *l_rlc_p = (rlc_am_entity_t *) rlc_pP; /*rlc_am_control_pdu_info_t control_pdu_info; int num_li; int16_t tb_size;*/ diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c index 3e1d1e769..9bbb7e699 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c @@ -68,7 +68,7 @@ rlc_am_rx_list_insert_pdu( if (pdu_info_p->sn < pdu_info_cursor_p->sn) { if (previous_cursor_p != NULL) { pdu_info_previous_cursor_p = &((rlc_am_rx_pdu_management_t*)(previous_cursor_p->data))->pdu_info; - if ((pdu_info_previous_cursor_p->sn == pdu_info_p->sn)) { + if (pdu_info_previous_cursor_p->sn == pdu_info_p->sn) { if (pdu_info_p->rf != pdu_info_previous_cursor_p->rf) { LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d WRONG RF -> DROPPED (vr(mr) < vr(r) and sn >= vr(r))\n", ctxt_pP->frame, @@ -121,7 +121,7 @@ rlc_am_rx_list_insert_pdu( if (previous_cursor_p != NULL) { pdu_info_previous_cursor_p = &((rlc_am_rx_pdu_management_t*)(previous_cursor_p->data))->pdu_info; - if ((pdu_info_previous_cursor_p->sn == pdu_info_cursor_p->sn)) { + if (pdu_info_previous_cursor_p->sn == pdu_info_cursor_p->sn) { if ((pdu_info_previous_cursor_p->so + pdu_info_previous_cursor_p->payload_size - 1) < pdu_info_p->so) { LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) < vr(r) and sn >= vr(r))\n", @@ -265,7 +265,7 @@ rlc_am_rx_list_insert_pdu( if (pdu_info_p->sn > pdu_info_cursor_p->sn) { if (previous_cursor_p != NULL) { pdu_info_previous_cursor_p = &((rlc_am_rx_pdu_management_t*)(previous_cursor_p->data))->pdu_info; - if ((pdu_info_previous_cursor_p->sn == pdu_info_cursor_p->sn)) { + if (pdu_info_previous_cursor_p->sn == pdu_info_cursor_p->sn) { if (pdu_info_p->rf != pdu_info_previous_cursor_p->rf) { LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d WRONG RF -> DROPPED (vr(mr) < vr(r) and sn >= vr(r))\n", ctxt_pP->frame, @@ -316,7 +316,7 @@ rlc_am_rx_list_insert_pdu( if (previous_cursor_p != NULL) { pdu_info_previous_cursor_p = &((rlc_am_rx_pdu_management_t*)(previous_cursor_p->data))->pdu_info; - if ((pdu_info_previous_cursor_p->sn == pdu_info_cursor_p->sn)) { + if (pdu_info_previous_cursor_p->sn == pdu_info_cursor_p->sn) { if ((pdu_info_p->so + pdu_info_p->payload_size - 1) < pdu_info_previous_cursor_p->so) { LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) < vr(r) and sn < vr(r))\n", @@ -462,7 +462,7 @@ rlc_am_rx_list_insert_pdu( if (previous_cursor_p != NULL) { pdu_info_previous_cursor_p = &((rlc_am_rx_pdu_management_t*)(previous_cursor_p->data))->pdu_info; - if ((pdu_info_previous_cursor_p->sn == pdu_info_p->sn)) { + if (pdu_info_previous_cursor_p->sn == pdu_info_p->sn) { if (pdu_info_p->rf != pdu_info_previous_cursor_p->rf) { LOG_N(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d WRONG RF -> DROPPED (vr(mr) > vr(r))\n", ctxt_pP->frame, @@ -516,7 +516,7 @@ rlc_am_rx_list_insert_pdu( if (previous_cursor_p != NULL) { pdu_info_previous_cursor_p = &((rlc_am_rx_pdu_management_t*)(previous_cursor_p->data))->pdu_info; - if ((pdu_info_previous_cursor_p->sn == pdu_info_cursor_p->sn)) { + if (pdu_info_previous_cursor_p->sn == pdu_info_cursor_p->sn) { if ((pdu_info_previous_cursor_p->so + pdu_info_previous_cursor_p->payload_size - 1) < pdu_info_p->so) { LOG_D(RLC, "[FRAME %05u][%s][RLC_AM][MOD %u/%u][RB %u][INSERT PDU] LINE %d RX PDU SN %04d SEGMENT OFFSET %05d (vr(mr) > vr(r) and sn >= vr(r))\n", diff --git a/openair2/RRC/LITE/rrc_eNB_S1AP.c b/openair2/RRC/LITE/rrc_eNB_S1AP.c index ba68ff73a..2b2e0d518 100644 --- a/openair2/RRC/LITE/rrc_eNB_S1AP.c +++ b/openair2/RRC/LITE/rrc_eNB_S1AP.c @@ -817,7 +817,7 @@ void rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ (uint8_t mod_id, uint8_t ue_index, if (ue_index == UE_INDEX_INVALID) { LOG_W(RRC, "[eNB] In S1AP_UE_CONTEXT_RELEASE_COMMAND: invalid UE\n"); - return (-1); + return; } else { int e_rab; int mod_id = 0; @@ -829,7 +829,7 @@ void rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ (uint8_t mod_id, uint8_t ue_index, S1AP_UE_CONTEXT_RELEASE_REQ(msg_context_release_req_p).cause = causeP; S1AP_UE_CONTEXT_RELEASE_REQ(msg_context_release_req_p).cause_value = cause_valueP; itti_send_msg_to_task(TASK_S1AP, mod_id, msg_context_release_req_p); - return (0); + return; } } diff --git a/openair2/UTIL/CLI/cli.h b/openair2/UTIL/CLI/cli.h index a4a17b905..ecff3240e 100644 --- a/openair2/UTIL/CLI/cli.h +++ b/openair2/UTIL/CLI/cli.h @@ -128,10 +128,12 @@ char g_sid[MAX_SID]; int com_help (char * arg); int com_exit (char *arg); -int prompt(char *arg),prompt_usage(void), info(char *arg); +int prompt(char *arg); +int prompt_usage(char *); +int info(char *arg); int start(char *arg), set(char *arg); -int start_usage(void), set_usage(void); +int start_usage(char *), set_usage(void); /* Forward declarations. */ char *stripwhite (char *string); diff --git a/openair2/UTIL/CLI/cli_cmd.c b/openair2/UTIL/CLI/cli_cmd.c index b8707a244..98a75dd8e 100644 --- a/openair2/UTIL/CLI/cli_cmd.c +++ b/openair2/UTIL/CLI/cli_cmd.c @@ -136,7 +136,7 @@ int start (char *arg) { return OK; if (valid_argument ("start", arg) == ERR){ - start_usage(); + start_usage(""); return ERR; } @@ -272,13 +272,13 @@ int process_argument(int optc, char* optv[]) { } -int prompt_usage(void) { +int prompt_usage(char *arg) { sprintf(buffer, "Usage: prompt [value]\n"); send(cli_cfg->cfd, buffer, strlen(buffer), 0); return 0; } -int start_usage(void) { +int start_usage(char *arg) { sprintf(buffer, "Usage: start [enb|UE] [enb_index][0: stop, 1: start] \n"); send(cli_cfg->cfd, buffer, strlen(buffer), 0); sprintf(buffer, "Example to start enb 0: start enb 0 1 \n"); diff --git a/openair2/UTIL/OCG/OCG.c b/openair2/UTIL/OCG/OCG.c index f22cf2b83..22fbc3c65 100644 --- a/openair2/UTIL/OCG/OCG.c +++ b/openair2/UTIL/OCG/OCG.c @@ -182,7 +182,7 @@ int OCG_main(char is_local_server[FILENAME_LENGTH_MAX]) { strcat(output_dir, file_date); strcat(output_dir, "/"); strcpy(dst_dir, output_dir); - oai_emulation.info.output_path = &dst_dir; // information for other modules within OAI + oai_emulation.info.output_path = dst_dir; // information for other modules within OAI } else state = STATE_GENERATE_REPORT; break; diff --git a/openair2/UTIL/OMG/mobility_parser.c b/openair2/UTIL/OMG/mobility_parser.c index e048f148c..5535ba05a 100644 --- a/openair2/UTIL/OMG/mobility_parser.c +++ b/openair2/UTIL/OMG/mobility_parser.c @@ -44,6 +44,7 @@ #include "mobility_parser.h" #include "omg.h" #include <math.h> +#include "assertions.h" extern hash_table_t **table; extern node_info **list_head; @@ -264,4 +265,6 @@ get_next_data (hash_table_t * table, int vid, int flag) } else return links; + + DevAssert(false); // FIXME return 0? } diff --git a/openair3/RAL-LTE/INTERFACE-802.21/C/MIH_C_F1_basic_data_types_codec.c b/openair3/RAL-LTE/INTERFACE-802.21/C/MIH_C_F1_basic_data_types_codec.c index 6e3d494da..1a6e2753d 100755 --- a/openair3/RAL-LTE/INTERFACE-802.21/C/MIH_C_F1_basic_data_types_codec.c +++ b/openair3/RAL-LTE/INTERFACE-802.21/C/MIH_C_F1_basic_data_types_codec.c @@ -30,6 +30,7 @@ #define MIH_C_INTERFACE #define MIH_C_F1_BASIC_DATA_TYPES_CODEC_C #include "MIH_C_F1_basic_data_types_codec.h" +#include <inttypes.h> //----------------------------------------------------------------------------- unsigned int MIH_C_BITMAP82String(MIH_C_BITMAP8_T* dataP, char* bufP) { @@ -72,21 +73,21 @@ void MIH_C_BITMAP32_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP32_T* dataP) { //----------------------------------------------------------------------------- void MIH_C_BITMAP64_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP64_T* dataP) { //----------------------------------------------------------------------------- - printf("[MIH_C] %s: %16X\n", __FUNCTION__, *dataP); + printf("[MIH_C] %s: %16"PRIX64"\n", __FUNCTION__, *dataP); BitBuffer_write32(bbP, (MIH_C_UNSIGNED_INT4_T)(*dataP>>32)); BitBuffer_write32(bbP, (MIH_C_UNSIGNED_INT4_T)*dataP); } //----------------------------------------------------------------------------- void MIH_C_BITMAP128_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP128_T* dataP) { //----------------------------------------------------------------------------- - printf("[MIH_C] %s: %16X%16X\n", __FUNCTION__, dataP->val[0], dataP->val[1]); + printf("[MIH_C] %s: %16"PRIX64"%16"PRIX64"\n", __FUNCTION__, dataP->val[0], dataP->val[1]); MIH_C_BITMAP64_encode(bbP, &dataP->val[0]); MIH_C_BITMAP64_encode(bbP, &dataP->val[1]); } //----------------------------------------------------------------------------- void MIH_C_BITMAP256_encode(Bit_Buffer_t* bbP, MIH_C_BITMAP256_T* dataP) { //----------------------------------------------------------------------------- - printf("[MIH_C] %s: %16X%16X%16X%16X\n", __FUNCTION__, dataP->val[0], dataP->val[1], dataP->val[2], dataP->val[3]); + printf("[MIH_C] %s: %16"PRIX64"%16"PRIX64"%16"PRIX64"%16"PRIX64"\n", __FUNCTION__, dataP->val[0], dataP->val[1], dataP->val[2], dataP->val[3]); MIH_C_BITMAP64_encode(bbP, &dataP->val[0]); MIH_C_BITMAP64_encode(bbP, &dataP->val[1]); MIH_C_BITMAP64_encode(bbP, &dataP->val[2]); diff --git a/openair3/RAL-LTE/LTE_RAL_ENB/SRC/lteRALenb_action.c b/openair3/RAL-LTE/LTE_RAL_ENB/SRC/lteRALenb_action.c index fa6fe420f..0822e38fc 100755 --- a/openair3/RAL-LTE/LTE_RAL_ENB/SRC/lteRALenb_action.c +++ b/openair3/RAL-LTE/LTE_RAL_ENB/SRC/lteRALenb_action.c @@ -307,7 +307,7 @@ int eRAL_action_save_flow_id(ral_enb_instance_t instanceP, MIH_C_FLOW_ID_T* flow ** -1 if the list is full. ** ***************************************************************************/ int eRAL_action_set_channel_id (ral_enb_instance_t instanceP, MIH_C_FLOW_ID_T* flowId, int cnxid){ - char addr[128]; +// char addr[128]; //char port[8]; int f_ix; @@ -763,12 +763,12 @@ MIH_C_LINK_AC_RESULT_T eRAL_action_link_activate_resources(ral_enb_instance_t in /* Map QoS */ int mapping_result = eRAL_process_map_qos(instanceP, mt_ix, ch_ix); if (mapping_result) { - int rc; + int rc = -1; #ifdef RAL_DUMMY rc = eRAL_NAS_send_rb_establish_request(mt_ix, ch_ix); #endif #ifdef RAL_REALTIME - // LG rc = RAL_process_NAS_message(IO_OBJ_RB, IO_CMD_ADD, mt_ix, ch_ix); + // LG rc = RAL_process_NAS_message(IO_OBJ_RB, IO_CMD_ADD, mt_ix, ch_ix); // FIXME why is this commented? #endif if (rc < 0) { /* Failed to send RB establishment request */ @@ -849,12 +849,12 @@ MIH_C_LINK_AC_RESULT_T eRAL_action_link_deactivate_resources(ral_enb_instance_t * and go ahead in the request processing. */ (void) eRAL_action_del_channel_id(instanceP, f_ix); - int rc; + int rc = -1; #ifdef RAL_DUMMY rc = eRAL_NAS_send_rb_release_request(mt_ix, ch_ix); #endif #ifdef RAL_REALTIME - // LG rc = RAL_process_NAS_message(IO_OBJ_RB, IO_CMD_DEL, mt_ix, ch_ix); + // LG rc = RAL_process_NAS_message(IO_OBJ_RB, IO_CMD_DEL, mt_ix, ch_ix); // FIXME why is this commented? #endif if (rc < 0) { diff --git a/openair3/RAL-LTE/LTE_RAL_ENB/SRC/lteRALenb_process.c b/openair3/RAL-LTE/LTE_RAL_ENB/SRC/lteRALenb_process.c index 2280be8ca..57366a857 100755 --- a/openair3/RAL-LTE/LTE_RAL_ENB/SRC/lteRALenb_process.c +++ b/openair3/RAL-LTE/LTE_RAL_ENB/SRC/lteRALenb_process.c @@ -145,7 +145,7 @@ char* eRAL_process_mt_addr_to_string(const unsigned char* ip_addr) int i, index = 0; for (i = 0; i < 16; i++) { - index += sprintf(&buffer[index], "%.2hX", ip_addr[i]); + index += sprintf(&buffer[index], "%.2hhX", ip_addr[i]); if (i % 2) buffer[index++] = ':'; } buffer[--index] = '\0'; diff --git a/openair3/RAL-LTE/LTE_RAL_ENB/SRC/lteRALenb_rrc_msg.c b/openair3/RAL-LTE/LTE_RAL_ENB/SRC/lteRALenb_rrc_msg.c index 6150bc1f6..0e33fe20f 100755 --- a/openair3/RAL-LTE/LTE_RAL_ENB/SRC/lteRALenb_rrc_msg.c +++ b/openair3/RAL-LTE/LTE_RAL_ENB/SRC/lteRALenb_rrc_msg.c @@ -101,7 +101,7 @@ void eRAL_rx_rrc_ral_connection_establishment_indication(instance_t instanceP, M void eRAL_rx_rrc_ral_connection_reestablishment_indication(instance_t instanceP, MessageDef *msg_pP) //--------------------------------------------------------------------------------------------------------------------- { - module_id_t mod_id = instanceP; +// module_id_t mod_id = instanceP; #warning "TO DO ral_rx_rrc_ral_connection_reestablishment_indication" } //--------------------------------------------------------------------------------------------------------------------- @@ -146,14 +146,14 @@ void eRAL_rx_rrc_ral_connection_reconfiguration_indication(instance_t instanceP, void eRAL_rx_rrc_ral_measurement_report_indication(instance_t instanceP, MessageDef *msg_pP) //--------------------------------------------------------------------------------------------------------------------- { - module_id_t mod_id = instanceP; +// module_id_t mod_id = instanceP; } //--------------------------------------------------------------------------------------------------------------------- void eRAL_rx_rrc_ral_connection_release_indication(instance_t instanceP, MessageDef *msg_pP) //--------------------------------------------------------------------------------------------------------------------- { - module_id_t mod_id = instanceP; +// module_id_t mod_id = instanceP; } diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index f6c50210e..e4dda83ae 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -210,8 +210,8 @@ static void *UE_thread_synch(void *arg) { sync_mode_t sync_mode = pss; int card; int ind; - int CC_id; - int k; +// int CC_id; +// int k; int found; UE->is_synchronized = 0; -- GitLab