From ca7e56d111d6ae626ec11202bbbdc87e707c13e1 Mon Sep 17 00:00:00 2001
From: Lionel Gauthier <lionel.gauthier@eurecom.fr>
Date: Thu, 30 Apr 2015 09:47:25 +0000
Subject: [PATCH] Sebastian Held patches15/0038-fix-compiler-warnings.patch

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7340 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 openair2/LAYER2/MAC/eNB_scheduler_mch.c              | 2 +-
 openair2/LAYER2/RLC/rlc.h                            | 4 ++--
 openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.c | 2 +-
 openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h | 2 +-
 openair2/RRC/LITE/L2_interface.c                     | 2 +-
 openair2/RRC/LITE/proto.h                            | 2 +-
 openair2/RRC/LITE/rrc_common.c                       | 2 +-
 openair2/RRC/LITE/rrc_eNB_S1AP.c                     | 4 ++--
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/openair2/LAYER2/MAC/eNB_scheduler_mch.c b/openair2/LAYER2/MAC/eNB_scheduler_mch.c
index 42ec471b24..caa9e9988d 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_mch.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_mch.c
@@ -572,7 +572,7 @@ int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_fra
     if ((TBS - header_len_mtch - header_len_mcch - header_len_msi - sdu_length_total) < 0) {
       LOG_E(MAC,"Error in building MAC PDU, TBS %d < PDU %d \n",
             TBS, header_len_mtch + header_len_mcch + header_len_msi + sdu_length_total);
-      return;
+      return 0;
     } else if ((TBS - header_len_mtch - header_len_mcch - header_len_msi - sdu_length_total) <= 2) {
       padding = (TBS - header_len_mtch - header_len_mcch - header_len_msi - sdu_length_total);
       post_padding = 0;
diff --git a/openair2/LAYER2/RLC/rlc.h b/openair2/LAYER2/RLC/rlc.h
index 90d469c9eb..e96f5a3943 100755
--- a/openair2/LAYER2/RLC/rlc.h
+++ b/openair2/LAYER2/RLC/rlc.h
@@ -185,7 +185,7 @@ protected_rlc(void (*rlc_rrc_data_ind)(
                 const protocol_ctxt_t* const ctxtP,
                 const rb_id_t     rb_idP,
                 const sdu_size_t  sdu_sizeP,
-                uint8_t   * const sduP);)
+                const uint8_t   * const sduP);)
 
 protected_rlc(void (*rlc_rrc_data_conf)(
                 const protocol_ctxt_t* const ctxtP,
@@ -197,7 +197,7 @@ typedef void (rrc_data_ind_cb_t)(
   const protocol_ctxt_t* const ctxtP,
   const rb_id_t     rb_idP,
   const sdu_size_t  sdu_sizeP,
-  uint8_t   * const sduP);
+  const uint8_t   * const sduP);
 
 typedef void (rrc_data_conf_cb_t)(
   const protocol_ctxt_t* const ctxtP,
diff --git a/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.c b/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.c
index 785e446d6c..b22d059cd8 100644
--- a/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.c
+++ b/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.c
@@ -93,7 +93,7 @@ mac_rrc_data_req(
   const frame_t     frameP,
   const rb_id_t     srb_idP,
   const uint8_t     nb_tbP,
-  const uint8_t    *buffer_pP,
+  uint8_t* const    buffer_pP,
   const eNB_flag_t  eNB_flagP,
   const uint8_t     eNB_indexP,
   const uint8_t     mbsfn_sync_areaP
diff --git a/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h b/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h
index af2a49942e..97a1a53849 100644
--- a/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h
+++ b/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h
@@ -47,7 +47,7 @@ mac_rrc_data_req(
   const frame_t         frameP,
   const rb_id_t         srb_idP,
   const uint8_t         nb_tbP,
-  const uint8_t        *buffer_pP,
+  uint8_t* const        buffer_pP,
   const eNB_flag_t      eNB_flagP,
   const mac_enb_index_t eNB_indexP,
   const uint8_t         mbsfn_sync_areaP
diff --git a/openair2/RRC/LITE/L2_interface.c b/openair2/RRC/LITE/L2_interface.c
index b96142cdea..82dcd0f7a6 100644
--- a/openair2/RRC/LITE/L2_interface.c
+++ b/openair2/RRC/LITE/L2_interface.c
@@ -341,7 +341,7 @@ mac_rrc_lite_data_ind(
 {
   SRB_INFO *Srb_info;
   protocol_ctxt_t ctxt;
-  sdu_size_t      sdu_size;
+  sdu_size_t      sdu_size = 0;
   /*
   int si_window;
    */
diff --git a/openair2/RRC/LITE/proto.h b/openair2/RRC/LITE/proto.h
index b88d4b348c..23dae786cf 100644
--- a/openair2/RRC/LITE/proto.h
+++ b/openair2/RRC/LITE/proto.h
@@ -66,7 +66,7 @@ void rrc_top_cleanup(void);
 */
 RRC_status_t
 rrc_rx_tx(
-  const protocol_ctxt_t* const ctxt_pP,
+  protocol_ctxt_t* const ctxt_pP,
   const uint8_t      enb_index,
   const int          CC_id
 );
diff --git a/openair2/RRC/LITE/rrc_common.c b/openair2/RRC/LITE/rrc_common.c
index 1305ac5d2f..aa1155c683 100644
--- a/openair2/RRC/LITE/rrc_common.c
+++ b/openair2/RRC/LITE/rrc_common.c
@@ -399,7 +399,7 @@ rrc_t310_expiration(
 //-----------------------------------------------------------------------------
 RRC_status_t
 rrc_rx_tx(
-  const protocol_ctxt_t* const ctxt_pP,
+  protocol_ctxt_t* const ctxt_pP,
   const uint8_t      enb_indexP,
   const int          CC_id
 )
diff --git a/openair2/RRC/LITE/rrc_eNB_S1AP.c b/openair2/RRC/LITE/rrc_eNB_S1AP.c
index b207079a45..8629aefbce 100644
--- a/openair2/RRC/LITE/rrc_eNB_S1AP.c
+++ b/openair2/RRC/LITE/rrc_eNB_S1AP.c
@@ -894,7 +894,7 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
 
     /* TODO parameters yet to process ... */
     {
-      S1AP_INITIAL_CONTEXT_SETUP_REQ(msg_p).ue_ambr;
+//      S1AP_INITIAL_CONTEXT_SETUP_REQ(msg_p).ue_ambr;
     }
 
     rrc_eNB_process_security (
@@ -970,7 +970,7 @@ int rrc_eNB_process_S1AP_UE_CTXT_MODIFICATION_REQ(MessageDef *msg_p, const char
     /* TODO parameters yet to process ... */
     {
       if (S1AP_UE_CTXT_MODIFICATION_REQ(msg_p).present & S1AP_UE_CONTEXT_MODIFICATION_UE_AMBR) {
-        S1AP_UE_CTXT_MODIFICATION_REQ(msg_p).ue_ambr;
+//        S1AP_UE_CTXT_MODIFICATION_REQ(msg_p).ue_ambr;
       }
     }
 
-- 
GitLab