From e196210a51b835fd43a8a05d6d8eee09ddd31aa5 Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Mon, 3 Oct 2016 11:17:34 +0200
Subject: [PATCH] remove warning: rrc_ue_generate_MeasurementReport had const
 qualifier

rrc_ue_generate_MeasurementReport calls pdcp_data_req which changes
the content of ctxt_pP.

I'm not sure of the logic at play here, so maybe removing 'const' is not
the right solution and there is a real bug...
---
 openair2/RRC/LITE/proto.h  | 2 +-
 openair2/RRC/LITE/rrc_UE.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/openair2/RRC/LITE/proto.h b/openair2/RRC/LITE/proto.h
index 369105bb2b..a2f8667752 100644
--- a/openair2/RRC/LITE/proto.h
+++ b/openair2/RRC/LITE/proto.h
@@ -384,7 +384,7 @@ ue_meas_filtering(
 
 void
 ue_measurement_report_triggering(
-  const protocol_ctxt_t* const ctxt_pP,
+  protocol_ctxt_t*        const ctxt_pP,
   const uint8_t                 eNB_index
 );
 
diff --git a/openair2/RRC/LITE/rrc_UE.c b/openair2/RRC/LITE/rrc_UE.c
index 8ea604f932..e77fc44af8 100644
--- a/openair2/RRC/LITE/rrc_UE.c
+++ b/openair2/RRC/LITE/rrc_UE.c
@@ -131,7 +131,7 @@ static void rrc_ue_generate_RRCConnectionSetupComplete( const protocol_ctxt_t* c
  */
 static void rrc_ue_generate_RRCConnectionReconfigurationComplete( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index, const uint8_t Transaction_id );
 
-static void rrc_ue_generate_MeasurementReport( const protocol_ctxt_t* const ctxt_pP, uint8_t eNB_index );
+static void rrc_ue_generate_MeasurementReport(protocol_ctxt_t* const ctxt_pP, uint8_t eNB_index );
 
 static uint8_t check_trigger_meas_event(
   uint8_t module_idP,
@@ -3562,7 +3562,7 @@ void ue_meas_filtering( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_
 
 //Below routine implements Measurement Reporting procedure from 36.331 Section 5.5.5
 //-----------------------------------------------------------------------------
-static void rrc_ue_generate_MeasurementReport( const protocol_ctxt_t* const ctxt_pP, uint8_t eNB_index )
+static void rrc_ue_generate_MeasurementReport(protocol_ctxt_t* const ctxt_pP, uint8_t eNB_index )
 {
 
   uint8_t             buffer[32], size;
@@ -3643,7 +3643,7 @@ static void rrc_ue_generate_MeasurementReport( const protocol_ctxt_t* const ctxt
 
 // Measurement report triggering, described in 36.331 Section 5.5.4.1: called periodically
 //-----------------------------------------------------------------------------
-void ue_measurement_report_triggering( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index )
+void ue_measurement_report_triggering(protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index )
 {
   uint8_t               i,j;
   Hysteresis_t     hys;
-- 
GitLab