Commit 20b6fee6 authored by Cedric Roux's avatar Cedric Roux

remove more warnings

parent 2cea2dbe
......@@ -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;
......
......@@ -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"
......
......@@ -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)
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
......
......@@ -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
/** @}*/
......@@ -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;
......
......@@ -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,
......
......@@ -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);
......
......@@ -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 )
{
......
......@@ -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;
......
......@@ -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
};
......
......@@ -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],
......
......@@ -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));
......
......@@ -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];
......
......@@ -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
......
......@@ -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,
......
......@@ -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]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment