From 20b6fee6327365d2eb346c4480eab480521f1686 Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Sun, 27 Mar 2016 13:36:37 +0200
Subject: [PATCH] remove more warnings

---
 openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c |  2 +-
 openair1/PHY/LTE_TRANSPORT/dlsch_coding.c          |  1 +
 openair1/SCHED/phy_procedures_lte_eNb.c            |  1 +
 openair1/SCHED/phy_procedures_lte_ue.c             |  2 ++
 openair2/LAYER2/MAC/eNB_scheduler_bch.c            |  4 ++--
 openair2/LAYER2/MAC/pre_processor.c                |  2 +-
 openair2/LAYER2/MAC/proto.h                        |  1 +
 openair2/LAYER2/MAC/ra_procedures.c                |  7 ++++++-
 openair2/LAYER2/openair2_proc.c                    |  4 ++--
 openair2/PHY_INTERFACE/defs.h                      | 11 ++++++++---
 openair2/RRC/LITE/rrc_UE.c                         |  8 ++++++--
 openair2/RRC/LITE/rrc_eNB_S1AP.c                   |  3 +++
 openair2/RRC/LITE/vars.h                           | 14 ++++++++++----
 openair2/UTIL/OTG/otg_kpi.c                        |  4 ++--
 openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c          |  2 +-
 openair3/NAS/UE/API/USIM/usim_api.c                |  2 +-
 targets/RT/USER/lte-softmodem.c                    |  8 ++++----
 targets/RT/USER/lte-ue.c                           |  2 +-
 targets/SIMU/USER/init_lte.c                       |  4 ++--
 19 files changed, 55 insertions(+), 27 deletions(-)

diff --git a/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c b/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c
index 378832ccf7..d5bfee81ed 100644
--- a/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c
+++ b/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c
@@ -48,7 +48,7 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB,
   LTE_eNB_COMMON *eNB_common_vars = &phy_vars_eNB->lte_eNB_common_vars;
   LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->lte_frame_parms;
   PHY_MEASUREMENTS_eNB *phy_measurements = &phy_vars_eNB->PHY_measurements_eNB[eNB_id];
-  int32_t *rb_mask = phy_vars_eNB->rb_mask_ul;
+  uint32_t *rb_mask = phy_vars_eNB->rb_mask_ul;
 
   uint32_t aarx /* ,rx_power_correction */;
   uint32_t rb;
diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
index 95af038ab0..bf422fc37a 100644
--- a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+++ b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
@@ -44,6 +44,7 @@
 #include "PHY/CODING/extern.h"
 #include "PHY/CODING/lte_interleaver_inline.h"
 #include "PHY/LTE_TRANSPORT/defs.h"
+#include "SCHED/defs.h"
 #include "defs.h"
 #include "UTIL/LOG/vcd_signal_dumper.h"
 
diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c
index 4042cb511c..e8c9ac670b 100755
--- a/openair1/SCHED/phy_procedures_lte_eNb.c
+++ b/openair1/SCHED/phy_procedures_lte_eNb.c
@@ -612,6 +612,7 @@ void phy_eNB_lte_check_measurement_thresholds(instance_t instanceP, ral_threshol
 #endif
 
 
+unsigned int taus(void);
 
 void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_eNB,uint8_t abstraction_flag,
                            relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn)
diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c
index b29c229f27..e7b4980ac3 100755
--- a/openair1/SCHED/phy_procedures_lte_ue.c
+++ b/openair1/SCHED/phy_procedures_lte_ue.c
@@ -902,6 +902,8 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
           }
           */
 
+          unsigned int taus(void);
+
           for (i=0; i<input_buffer_length; i++)
             ulsch_input_buffer[i]= (uint8_t)(taus()&0xff);
 
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_bch.c b/openair2/LAYER2/MAC/eNB_scheduler_bch.c
index 65240356a7..f3774777a1 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_bch.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_bch.c
@@ -85,9 +85,9 @@ schedule_SI(
   int CC_id;
   eNB_MAC_INST *eNB = &eNB_mac_inst[module_idP];
   uint8_t *vrb_map;
-  int first_rb;
+  int first_rb = -1;
   int rballoc[MAX_NUM_CCs];
-  int sizeof1A_bytes,sizeof1A_bits;
+  int sizeof1A_bytes,sizeof1A_bits = -1;
   DCI_PDU *DCI_pdu;
 
   start_meas(&eNB->schedule_si);
diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c
index 39c4aedb4d..c744d1d90a 100644
--- a/openair2/LAYER2/MAC/pre_processor.c
+++ b/openair2/LAYER2/MAC/pre_processor.c
@@ -748,7 +748,7 @@ void dlsch_scheduler_pre_processor_reset (int module_idP,
   UE_list_t *UE_list=&eNB_mac_inst[module_idP].UE_list;
   UE_sched_ctrl *ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
   rnti_t rnti = UE_RNTI(module_idP,UE_id);
-  uint8_t *vrb_map = &eNB_mac_inst[module_idP].common_channels[CC_id].vrb_map;
+  uint8_t *vrb_map = eNB_mac_inst[module_idP].common_channels[CC_id].vrb_map;
   int RBGsize = PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL/N_RBG;
 #ifdef SF05_LIMIT
   //int subframe05_limit=0;
diff --git a/openair2/LAYER2/MAC/proto.h b/openair2/LAYER2/MAC/proto.h
index 9afe098d77..26656878f6 100644
--- a/openair2/LAYER2/MAC/proto.h
+++ b/openair2/LAYER2/MAC/proto.h
@@ -777,6 +777,7 @@ rrc_get_estimated_ue_distance(
   const int         CC_idP,
   const uint8_t     loc_typeP);
 
+void fill_dci(DCI_PDU *DCI_pdu, uint8_t sched_subframe, PHY_VARS_eNB *phy_vars_eNB);
 
 #endif
 /** @}*/
diff --git a/openair2/LAYER2/MAC/ra_procedures.c b/openair2/LAYER2/MAC/ra_procedures.c
index 43ec8b05ec..669077bf4f 100644
--- a/openair2/LAYER2/MAC/ra_procedures.c
+++ b/openair2/LAYER2/MAC/ra_procedures.c
@@ -152,6 +152,9 @@ void get_prach_resources(module_id_t module_idP,
     }
   }
 
+  /* TODO: gcc warns if this variable is not always set, let's put -1 for no more warning */
+  messageSizeGroupA = -1;
+
   if (!rach_ConfigCommon->preambleInfo.preamblesGroupAConfig) {
     noGroupB = 1;
   } else {
@@ -171,6 +174,8 @@ void get_prach_resources(module_id_t module_idP,
       break;
     }
 
+    /* TODO: what value to use as default? */
+    messagePowerOffsetGroupB = -9999;
     switch (rach_ConfigCommon->preambleInfo.preamblesGroupAConfig->messagePowerOffsetGroupB) {
     case 0:
       messagePowerOffsetGroupB = -9999;
@@ -495,7 +500,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP,
           UE_mac_inst[module_idP].RA_PREAMBLE_TRANSMISSION_COUNTER++;
           UE_mac_inst[module_idP].RA_prach_resources.ra_PREAMBLE_RECEIVED_TARGET_POWER +=
             (rach_ConfigCommon->powerRampingParameters.powerRampingStep<<1);  // 2dB increments in ASN.1 definition
-	  int preambleTransMax;
+	  int preambleTransMax = -1;
 	  switch (rach_ConfigCommon->ra_SupervisionInfo.preambleTransMax) {
 	  case RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3:
 	    preambleTransMax = 3;
diff --git a/openair2/LAYER2/openair2_proc.c b/openair2/LAYER2/openair2_proc.c
index 284f91a7f8..e09adaea8c 100644
--- a/openair2/LAYER2/openair2_proc.c
+++ b/openair2/LAYER2/openair2_proc.c
@@ -150,7 +150,7 @@ int dump_eNB_l2_stats(char *buffer, int length)
                      eNB->eNB_stats[CC_id].dlsch_pdus_tx,
                      eNB->eNB_stats[CC_id].total_dlsch_pdus_tx);
 
-      len += sprintf(&buffer[len],"ULSCH bitrate (TTI %u, avg %u) kbps, Received bytes (TTI %u, total %u), Received PDU (TTI %u, total %lu) \n",
+      len += sprintf(&buffer[len],"ULSCH bitrate (TTI %u, avg %u) kbps, Received bytes (TTI %u, total %u), Received PDU (TTI %lu, total %u) \n",
                      eNB->eNB_stats[CC_id].ulsch_bitrate,
                      eNB->eNB_stats[CC_id].total_ulsch_bitrate,
                      eNB->eNB_stats[CC_id].ulsch_bytes_rx,
@@ -201,7 +201,7 @@ int dump_eNB_l2_stats(char *buffer, int length)
                        UE_list->eNB_UE_stats[CC_id][UE_id].avg_overhead_bytes
                       );
         
-	len += sprintf(&buffer[len],"[MAC] UE %d (ULSCH), Status %d, RNTI %x : rx power (normalized %d,  target %d), MCS (pre %d, post %d), RB (rx %d, retx %d, total %d), Current TBS %d \n",
+	len += sprintf(&buffer[len],"[MAC] UE %d (ULSCH), Status %s, RNTI %x : rx power (normalized %d,  target %d), MCS (pre %d, post %d), RB (rx %d, retx %d, total %d), Current TBS %d \n",
                        UE_id,
                        map_int_to_str(rrc_status_names, UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status),
                        UE_list->eNB_UE_stats[CC_id][UE_id].crnti,
diff --git a/openair2/PHY_INTERFACE/defs.h b/openair2/PHY_INTERFACE/defs.h
index 7b0367f537..c34bec28d7 100755
--- a/openair2/PHY_INTERFACE/defs.h
+++ b/openair2/PHY_INTERFACE/defs.h
@@ -241,19 +241,24 @@ typedef struct {
   uint16_t (*get_nCCE_max)(module_id_t Mod_id,uint8_t  CC_id,int num_pdcch_symbols,int subframe);
 
 
-  int (*get_nCCE_offset)(unsigned char L, int nCCE, int common_dci, unsigned short rnti, unsigned char subframe);
+  int (*get_nCCE_offset)(int *CCE_table,
+                         const unsigned char L,
+                         const int nCCE,
+                         const int common_dci,
+                         const unsigned short rnti,
+                         const unsigned char subframe);
 
   /// Function to retrieve number of PRB in an rb_alloc
   uint32_t (*get_nb_rb)(uint8_t ra_header, uint32_t rb_alloc, int n_rb_dl);
 
   /// Function to convert VRB to PRB for distributed allocation
-  int (*get_prb)(int N_RB_DL,int odd_slot,int vrb,int Ngap);
+  uint32_t (*get_prb)(int N_RB_DL,int odd_slot,int vrb,int Ngap);
 
   /// Function to retrieve transmission mode for UE
   uint8_t (*get_transmission_mode)(module_id_t Mod_id,uint8_t CC_id,rnti_t rnti);
 
   /// Function to retrieve rb_alloc bitmap from dci rballoc field and VRB type
-  uint32_t (*get_rballoc)(uint8_t vrb_type, uint16_t rb_alloc_dci);
+  uint32_t (*get_rballoc)(vrb_t vrb_type, uint16_t rb_alloc_dci);
 
   /// Function for UE MAC to retrieve current PHY connectivity mode (PRACH,RA_RESPONSE,PUSCH)
   UE_MODE_t (*get_ue_mode)(module_id_t Mod_id, uint8_t CC_id,uint8_t eNB_index);
diff --git a/openair2/RRC/LITE/rrc_UE.c b/openair2/RRC/LITE/rrc_UE.c
index ee35f317cd..25e24a864a 100644
--- a/openair2/RRC/LITE/rrc_UE.c
+++ b/openair2/RRC/LITE/rrc_UE.c
@@ -2268,6 +2268,9 @@ static const char* SIB2preambleTransMax( long value )
   case 10:
     return "n200";
   }
+
+  /* unreachable but gcc warns... */
+  return "ERR";
 }
 static const char* SIB2ra_ResponseWindowSize( long value )
 {
@@ -3063,9 +3066,10 @@ uint64_t arfcn_to_freq(long arfcn) {
     return((uint64_t)3400000000 + ((arfcn-41590)*100000));
   else if (arfcn <45590) // Band 43
     return((uint64_t)3600000000 + ((arfcn-43950)*100000));
-  else
+  else {
     LOG_E(RRC,"Unknown EARFCN %d\n",arfcn);
-
+    exit(1);
+  }
 }
 static void dump_sib5( SystemInformationBlockType5_t *sib5 )
 {
diff --git a/openair2/RRC/LITE/rrc_eNB_S1AP.c b/openair2/RRC/LITE/rrc_eNB_S1AP.c
index 679e629f16..e5738472c8 100644
--- a/openair2/RRC/LITE/rrc_eNB_S1AP.c
+++ b/openair2/RRC/LITE/rrc_eNB_S1AP.c
@@ -60,6 +60,9 @@
 #endif
 #include "msc.h"
 
+#include "gtpv1u_eNB_task.h"
+#include "RRC/LITE/rrc_eNB_GTPV1U.h"
+
 /* Value to indicate an invalid UE initial id */
 static const uint16_t UE_INITIAL_ID_INVALID = 0;
 
diff --git a/openair2/RRC/LITE/vars.h b/openair2/RRC/LITE/vars.h
index 122dea1df2..cb6e8c5238 100644
--- a/openair2/RRC/LITE/vars.h
+++ b/openair2/RRC/LITE/vars.h
@@ -88,18 +88,24 @@ struct LogicalChannelConfig__ul_SpecificParameters LCSRB2 =  {3,
 };
 
 
+#ifdef Rel10
+struct LogicalChannelConfig__ext1 logicalChannelSR_Mask_r9_ext1 = {
+         logicalChannelSR_Mask_r9: &logicalChannelSR_Mask_r9
+};
+#endif
+
 // These are the default SRB configurations from 36.331 (Chapter 9, p. 176-179 in v8.6)
-LogicalChannelConfig_t  SRB1_logicalChannelConfig_defaultValue = {&LCSRB1
+LogicalChannelConfig_t  SRB1_logicalChannelConfig_defaultValue = {ul_SpecificParameters: &LCSRB1
 #ifdef Rel10
                                                                   ,
-                                                                  &logicalChannelSR_Mask_r9
+                                                                  ext1: &logicalChannelSR_Mask_r9_ext1
 #endif
                                                                  };
 
-LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {&LCSRB2
+LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {ul_SpecificParameters: &LCSRB2
 #ifdef Rel10
                                                                  ,
-                                                                 &logicalChannelSR_Mask_r9
+                                                                 ext1: &logicalChannelSR_Mask_r9_ext1
 #endif
                                                                 };
 
diff --git a/openair2/UTIL/OTG/otg_kpi.c b/openair2/UTIL/OTG/otg_kpi.c
index 3aa55df05f..877150d892 100644
--- a/openair2/UTIL/OTG/otg_kpi.c
+++ b/openair2/UTIL/OTG/otg_kpi.c
@@ -61,7 +61,7 @@ void tx_throughput(int src, int dst, int application)
     else if (g_otg->flow_start[src][dst][application] < get_ctime() )
       otg_info->tx_throughput[src][dst][application]=((double)otg_info->tx_num_bytes[src][dst][application] *1000*8)/ ((get_ctime() - g_otg->flow_start[src][dst][application])*1024);
     else 
-      LOG_W("[src %d][dst %d][app %d] flow start time less than the simu time (start %d, duration %d, ctime %d)\n",
+      LOG_W(OTG, "[src %d][dst %d][app %d] flow start time less than the simu time (start %d, duration %d, ctime %d)\n",
 	    src, dst, application,
 	    g_otg->flow_start[src][dst][application],
 	    g_otg->flow_duration[src][dst][application],
@@ -94,7 +94,7 @@ if ((g_otg->flow_start[src][dst][application]+g_otg->flow_duration[src][dst][app
     else if (g_otg->flow_start[src][dst][application] < get_ctime() )
       otg_info->rx_goodput[src][dst][application]=((double)otg_info->rx_num_bytes[src][dst][application] *1000*8)/ ((get_ctime() - g_otg->flow_start[src][dst][application])*1024);
     else 
-      LOG_W("[src %d][dst %d][app %d] flow start time less than the simu time (start %d, duration %d, ctime %d)\n",
+      LOG_W(OTG, "[src %d][dst %d][app %d] flow start time less than the simu time (start %d, duration %d, ctime %d)\n",
 	    src, dst, application,
 	    g_otg->flow_start[src][dst][application],
 	    g_otg->flow_duration[src][dst][application],
diff --git a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c
index f00441dfa2..2301cfe5dc 100644
--- a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c
+++ b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c
@@ -694,7 +694,7 @@ nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT *hGtpuStackHandle, uint32_t st
   if(thiz) {
     thiz->id    = (NwPtrT)thiz;
     thiz->stackType = stackType;
-    thiz->seq   = (uint16_t) ((uint32_t)thiz) ; // FIXME interesting casts... don't know what this is good for...
+    thiz->seq   = (uint16_t) ((uintptr_t)thiz) ; // FIXME interesting casts... don't know what this is good for...
     RB_INIT(&(thiz->outstandingTxSeqNumMap));
     RB_INIT(&(thiz->outstandingRxSeqNumMap));
     RB_INIT(&(thiz->sessionMap));
diff --git a/openair3/NAS/UE/API/USIM/usim_api.c b/openair3/NAS/UE/API/USIM/usim_api.c
index 8a7a26de0d..51b99033bc 100644
--- a/openair3/NAS/UE/API/USIM/usim_api.c
+++ b/openair3/NAS/UE/API/USIM/usim_api.c
@@ -291,7 +291,7 @@ int usim_api_authenticate(const OctetString* rand_pP, const OctetString* autn_pP
     for (i = 0; i < USIM_API_SQN_MS_SIZE; i++) {
 //#warning "LG:BUG HERE TODO"
       sqn_ms[USIM_API_SQNMS_SIZE - i] =
-        ((uint8_t*)(_usim_api_data.sqn_ms))[USIM_API_SQN_MS_SIZE - i];
+        ((uint8_t*)(&_usim_api_data.sqn_ms))[USIM_API_SQN_MS_SIZE - i];
     }
 
     u8 sqnms[USIM_API_SQNMS_SIZE];
diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c
index c111e76879..1887e5a8bc 100644
--- a/targets/RT/USER/lte-softmodem.c
+++ b/targets/RT/USER/lte-softmodem.c
@@ -394,7 +394,7 @@ struct timespec clock_difftime(struct timespec start, struct timespec end)
     return temp;
 }
 
-void print_difftimes()
+void print_difftimes(void)
 {
 #ifdef DEBUG
     printf("difftimes min = %lu ns ; max = %lu ns\n", min_diff_time.tv_nsec, max_diff_time.tv_nsec);
@@ -1055,7 +1055,7 @@ static void* eNB_thread_tx( void* param )
   static int eNB_thread_tx_status[NUM_ENB_THREADS];
 
   eNB_proc_t *proc = (eNB_proc_t*)param;
-  FILE  *tx_time_file;
+  FILE  *tx_time_file = NULL;
   char tx_time_name[101];
 
   if (opp_enabled == 1) {
@@ -1274,7 +1274,7 @@ static void* eNB_thread_rx( void* param )
 
   eNB_proc_t *proc = (eNB_proc_t*)param;
 
-  FILE  *rx_time_file;
+  FILE  *rx_time_file = NULL;
   char rx_time_name[101];
   //int i;
 
@@ -1681,7 +1681,7 @@ static void* eNB_thread( void* arg )
 #ifdef RTAI
   printf( "[SCHED][eNB] Started eNB main thread (id %p)\n", task );
 #else
-  printf( "[SCHED][eNB] Started eNB main thread on CPU %d TID %d\n", sched_getcpu(), gettid());
+  printf( "[SCHED][eNB] Started eNB main thread on CPU %d TID %ld\n", sched_getcpu(), gettid());
 #endif
 
 #ifdef HARD_RT
diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c
index 4acb7e7a5f..f64d8d36f1 100644
--- a/targets/RT/USER/lte-ue.c
+++ b/targets/RT/USER/lte-ue.c
@@ -463,7 +463,7 @@ static void *UE_thread_synch(void *arg)
 	 if( UE->mode == rx_dump_frame ){
 	   FILE *fd;
 	   if ((UE->frame_rx&1) == 0) {  // this guarantees SIB1 is present 
-	     if (fd = fopen("rxsig_frame0.dat","w")) {
+	     if ((fd = fopen("rxsig_frame0.dat","w")) != NULL) {
 	       fwrite((void*)&UE->lte_ue_common_vars.rxdata[0][0],
 		      sizeof(int32_t),
 		      10*UE->lte_frame_parms.samples_per_tti,
diff --git a/targets/SIMU/USER/init_lte.c b/targets/SIMU/USER/init_lte.c
index bbb99260eb..85900387eb 100644
--- a/targets/SIMU/USER/init_lte.c
+++ b/targets/SIMU/USER/init_lte.c
@@ -211,11 +211,11 @@ PHY_VARS_RN* init_lte_RN(LTE_DL_FRAME_PARMS *frame_parms,
 
   if (eMBMS_active_state == multicast_relay) {
     for (i=0; i < 10 ; i++) { // num SF in a frame
-      PHY_vars_RN->dlsch_rn_MCH[i] = new_ue_dlsch(1,1,MAX_TURBO_ITERATIONS_MBSFN,NSOFT,frame_parms->N_RB_DL, 0);
+      PHY_vars_RN->dlsch_rn_MCH[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS_MBSFN,frame_parms->N_RB_DL, 0);
       LOG_D(PHY,"eNB %d : MCH[%d] %p\n",RN_id,i,PHY_vars_RN->dlsch_rn_MCH[i]);
     }
   } else {
-    PHY_vars_RN->dlsch_rn_MCH[0] = new_ue_dlsch(1,1,MAX_TURBO_ITERATIONS,NSOFT,frame_parms->N_RB_DL, 0);
+    PHY_vars_RN->dlsch_rn_MCH[0] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, 0);
     LOG_D(PHY,"eNB %d : MCH[0] %p\n",RN_id,PHY_vars_RN->dlsch_rn_MCH[0]);
   }
 
-- 
GitLab