Commit 5f823b40 authored by Cedric Roux's avatar Cedric Roux
Browse files

some more warning removals

parent f514c065
...@@ -698,6 +698,10 @@ void logRecord_mt(const char *file, const char *func, int line, int comp, ...@@ -698,6 +698,10 @@ void logRecord_mt(const char *file, const char *func, int line, int comp,
char *log_start; char *log_start;
char *log_end; char *log_end;
/* for no gcc warnings */
(void)log_start;
(void)log_end;
c = &g_log->log_component[comp]; c = &g_log->log_component[comp];
// do not apply filtering for LOG_F // do not apply filtering for LOG_F
...@@ -971,6 +975,10 @@ void logRecord_mt(const char *file, const char *func, int line, int comp, ...@@ -971,6 +975,10 @@ void logRecord_mt(const char *file, const char *func, int line, int comp,
*/ */
char log_buffer[MAX_LOG_TOTAL]; char log_buffer[MAX_LOG_TOTAL];
/* for no gcc warnings */
(void)log_start;
(void)log_end;
c = &g_log->log_component[comp]; c = &g_log->log_component[comp];
// do not apply filtering for LOG_F // do not apply filtering for LOG_F
......
...@@ -70,7 +70,7 @@ start_sumo_generator (omg_global_param omg_param_list) ...@@ -70,7 +70,7 @@ start_sumo_generator (omg_global_param omg_param_list)
if ((pid = fork ()) == 0) { if ((pid = fork ()) == 0) {
// Start SUMO in the child process // Start SUMO in the child process
system (sumo_line); if (system (sumo_line)) ; /* this if for no gcc warnings */
//childs addresss space //childs addresss space
} }
......
...@@ -147,7 +147,8 @@ int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cf ...@@ -147,7 +147,8 @@ int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cf
int rc; int rc;
//ToDo: EXMIMO harmonization is not complete. That is the reason for this ifdef //ToDo: EXMIMO harmonization is not complete. That is the reason for this ifdef
#ifdef EXMIMO #ifdef EXMIMO
device_init(device, openair0_cfg); int device_init(openair0_device *device, openair0_config_t *openair0_cfg);
rc = device_init(device, openair0_cfg);
#else #else
rc=load_lib(device, openair0_cfg, NULL,BBU_LOCAL_RADIO_HEAD ); rc=load_lib(device, openair0_cfg, NULL,BBU_LOCAL_RADIO_HEAD );
if ( rc >= 0) { if ( rc >= 0) {
......
...@@ -30,8 +30,10 @@ ...@@ -30,8 +30,10 @@
#define TARGET_RX_POWER 50 // Target digital power for the AGC #define TARGET_RX_POWER 50 // Target digital power for the AGC
#define TARGET_RX_POWER_MAX 53 // Maximum digital power for AGC #define TARGET_RX_POWER_MAX 53 // Maximum digital power for AGC
#define TARGET_RX_POWER_MIN 48 // Minimum digital power for AGC #define TARGET_RX_POWER_MIN 48 // Minimum digital power for AGC
#ifndef min
#define min(a,b) (((a)<(b))?(a):(b)) #define min(a,b) (((a)<(b))?(a):(b))
#define max(a,b) (((a)>(b))?(a):(b)) #define max(a,b) (((a)>(b))?(a):(b))
#endif
void gain_control_all (unsigned int rx_power_fil_dB, unsigned int card); void gain_control_all (unsigned int rx_power_fil_dB, unsigned int card);
void gain_control (unsigned int rx_power_fil_dB, unsigned int ant, unsigned int card); void gain_control (unsigned int rx_power_fil_dB, unsigned int ant, unsigned int card);
...@@ -98,4 +98,6 @@ unsigned int *openair0_daq_cnt(void); ...@@ -98,4 +98,6 @@ unsigned int *openair0_daq_cnt(void);
// set the TX and RX frequencies (card 0 only for now, to retain USRP compatibility) // set the TX and RX frequencies (card 0 only for now, to retain USRP compatibility)
int openair0_set_frequencies(openair0_device* device, openair0_config_t *openair0_cfg,int exmimo_dump_config); int openair0_set_frequencies(openair0_device* device, openair0_config_t *openair0_cfg,int exmimo_dump_config);
int openair0_set_gains(openair0_device* device, openair0_config_t *openair0_cfg);
#endif #endif
...@@ -1638,6 +1638,11 @@ static void* eNB_thread( void* arg ) ...@@ -1638,6 +1638,11 @@ static void* eNB_thread( void* arg )
int CC_id=0; int CC_id=0;
struct timespec trx_time0, trx_time1, trx_time2; struct timespec trx_time0, trx_time1, trx_time2;
/* avoid gcc warnings */
(void)trx_time0;
(void)trx_time1;
(void)trx_time2;
#ifdef RTAI #ifdef RTAI
RT_TASK* task = rt_task_init_schmod(nam2num("eNBmain"), 0, 0, 0, SCHED_FIFO, 0xF); RT_TASK* task = rt_task_init_schmod(nam2num("eNBmain"), 0, 0, 0, SCHED_FIFO, 0xF);
#else #else
......
...@@ -1401,14 +1401,14 @@ void *UE_thread(void *arg) ...@@ -1401,14 +1401,14 @@ void *UE_thread(void *arg)
RT_TASK *task; RT_TASK *task;
#endif #endif
// RTIME in, out, diff; // RTIME in, out, diff;
int slot=0,frame=0,hw_slot,last_slot,next_slot; int slot=0,frame=0,hw_slot;
// unsigned int aa; // unsigned int aa;
int delay_cnt; int delay_cnt;
RTIME time_in; RTIME time_in;
int hw_slot_offset=0,rx_offset_mbox=0,mbox_target=0,mbox_current=0; int /* hw_slot_offset=0, */ rx_offset_mbox=0,mbox_target=0,mbox_current=0;
int diff2; int diff2;
int i, ret; int /* i, */ ret;
int CC_id,card; int /* CC_id, */ card;
volatile unsigned int *DAQ_MBOX = openair0_daq_cnt(); volatile unsigned int *DAQ_MBOX = openair0_daq_cnt();
int wait_sync_cnt = 0; int wait_sync_cnt = 0;
...@@ -1688,7 +1688,7 @@ void *UE_thread(void *arg) ...@@ -1688,7 +1688,7 @@ void *UE_thread(void *arg)
frame++; frame++;
} }
} else if (UE->is_synchronized == 0) { // we are not yet synchronized } else if (UE->is_synchronized == 0) { // we are not yet synchronized
hw_slot_offset = 0; //hw_slot_offset = 0;
first_synch = 1; first_synch = 1;
slot = 0; slot = 0;
......
...@@ -97,7 +97,7 @@ void do_DL_sig(double **r_re0,double **r_im0, ...@@ -97,7 +97,7 @@ void do_DL_sig(double **r_re0,double **r_im0,
double rx_pwr; double rx_pwr;
int32_t rx_pwr2; int32_t rx_pwr2;
uint32_t i,aa; uint32_t i,aa;
uint32_t slot_offset,slot_offset_meas; uint32_t slot_offset,slot_offset_meas = 0;
double min_path_loss=-200; double min_path_loss=-200;
uint8_t hold_channel=0; uint8_t hold_channel=0;
...@@ -105,7 +105,7 @@ void do_DL_sig(double **r_re0,double **r_im0, ...@@ -105,7 +105,7 @@ void do_DL_sig(double **r_re0,double **r_im0,
uint8_t nb_antennas_rx = eNB2UE[0][0][CC_id]->nb_rx; // number of rx antennas at UE uint8_t nb_antennas_rx = eNB2UE[0][0][CC_id]->nb_rx; // number of rx antennas at UE
uint8_t nb_antennas_tx = eNB2UE[0][0][CC_id]->nb_tx; // number of tx antennas at eNB uint8_t nb_antennas_tx = eNB2UE[0][0][CC_id]->nb_tx; // number of tx antennas at eNB
LTE_DL_FRAME_PARMS *fp; //LTE_DL_FRAME_PARMS *fp;
// int subframe_sched = ((next_slot>>1) == 0) ? 9 : ((next_slot>>1)-1); // int subframe_sched = ((next_slot>>1) == 0) ? 9 : ((next_slot>>1)-1);
......
...@@ -208,15 +208,15 @@ void schedule_events() ...@@ -208,15 +208,15 @@ void schedule_events()
a = 5; a = 5;
uint16_t *priority[11];//={1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2}; //uint16_t *priority[11];//={1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2};
int tab[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; //int tab[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX];
Application_Config* application_config; Application_Config* application_config;
application_config = malloc(sizeof(Application_Config)); application_config = malloc(sizeof(Application_Config));
for(i=0; i<NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) { for(i=0; i<NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
tab[i]=i; //tab[i]=i;
application_config->customized_traffic.aggregation_level[i]=i; application_config->customized_traffic.aggregation_level[i]=i;
} }
...@@ -249,7 +249,7 @@ void schedule_events() ...@@ -249,7 +249,7 @@ void schedule_events()
//schedule(READ, MAC_ET, 500, NULL, ""); //schedule(READ, MAC_ET, 500, NULL, "");
//schedule(WRITE, MAC_ET, 100, NULL, ""); //schedule(WRITE, MAC_ET, 100, NULL, "");
//schedule(READ, TOPO_ET,110,NULL,"",0,0); //schedule(READ, TOPO_ET,110,NULL,"",0,0);
double b = (double) 45; //double b = (double) 45;
//schedule(READ, APP_ET,111,NULL,"",0,0); //schedule(READ, APP_ET,111,NULL,"",0,0);
//schedule(READ, SYS_ET,112,NULL,"",0,0); //schedule(READ, SYS_ET,112,NULL,"",0,0);
//schedule(READ, EMU_ET,113,NULL,"",-1,-1); //schedule(READ, EMU_ET,113,NULL,"",-1,-1);
...@@ -1844,7 +1844,6 @@ void update_emu_model(Event_t event) ...@@ -1844,7 +1844,6 @@ void update_emu_model(Event_t event)
printf("\n\n\nA NEW EMU MODEL\n\n\n"); printf("\n\n\nA NEW EMU MODEL\n\n\n");
OAI_Emulation *oai_emulation; OAI_Emulation *oai_emulation;
oai_emulation = get_OAI_emulation(); oai_emulation = get_OAI_emulation();
int i=0;
if(event.optype == READ) { if(event.optype == READ) {
if(event.key == NULL) { if(event.key == NULL) {
......
...@@ -530,19 +530,23 @@ l2l1_task (void *args_p) ...@@ -530,19 +530,23 @@ l2l1_task (void *args_p)
if(abstraction_flag==0) { if(abstraction_flag==0) {
for (UE_inst=0; UE_inst<NB_UE_INST; UE_inst++) { for (UE_inst=0; UE_inst<NB_UE_INST; UE_inst++) {
sprintf(UE_stats_th_filename,"UE_stats_th%d_tx%d.txt",UE_inst,oai_emulation.info.transmission_mode); /* TODO: transmission_mode is defined per CC, we set 0 for now */
sprintf(UE_stats_th_filename,"UE_stats_th%d_tx%d.txt",UE_inst,oai_emulation.info.transmission_mode[0]);
UE_stats_th[UE_inst] = fopen (UE_stats_th_filename, "w"); UE_stats_th[UE_inst] = fopen (UE_stats_th_filename, "w");
} }
sprintf(eNB_stats_th_filename,"eNB_stats_th_tx%d.txt",oai_emulation.info.transmission_mode); /* TODO: transmission_mode is defined per CC, we set 0 for now */
sprintf(eNB_stats_th_filename,"eNB_stats_th_tx%d.txt",oai_emulation.info.transmission_mode[0]);
eNB_avg_thr = fopen (eNB_stats_th_filename, "w"); eNB_avg_thr = fopen (eNB_stats_th_filename, "w");
} else { } else {
for (UE_inst=0; UE_inst<NB_UE_INST; UE_inst++) { for (UE_inst=0; UE_inst<NB_UE_INST; UE_inst++) {
sprintf(UE_stats_th_filename,"UE_stats_abs_th%d_tx%d.txt",UE_inst,oai_emulation.info.transmission_mode); /* TODO: transmission_mode is defined per CC, we set 0 for now */
sprintf(UE_stats_th_filename,"UE_stats_abs_th%d_tx%d.txt",UE_inst,oai_emulation.info.transmission_mode[0]);
UE_stats_th[UE_inst] = fopen (UE_stats_th_filename, "w"); UE_stats_th[UE_inst] = fopen (UE_stats_th_filename, "w");
} }
sprintf(eNB_stats_th_filename,"eNB_stats_abs_th_tx%d.txt",oai_emulation.info.transmission_mode); /* TODO: transmission_mode is defined per CC, we set 0 for now */
sprintf(eNB_stats_th_filename,"eNB_stats_abs_th_tx%d.txt",oai_emulation.info.transmission_mode[0]);
eNB_avg_thr = fopen (eNB_stats_th_filename, "w"); eNB_avg_thr = fopen (eNB_stats_th_filename, "w");
} }
...@@ -977,7 +981,7 @@ l2l1_task (void *args_p) ...@@ -977,7 +981,7 @@ l2l1_task (void *args_p)
for (UE_inst = 0; UE_inst < NB_UE_INST; UE_inst++) for (UE_inst = 0; UE_inst < NB_UE_INST; UE_inst++)
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
#warning figure out what to do with UE frame_parms during initial_sync //#warning figure out what to do with UE frame_parms during initial_sync
do_DL_sig (r_re0, do_DL_sig (r_re0,
r_im0, r_im0,
r_re, r_re,
...@@ -1000,7 +1004,7 @@ l2l1_task (void *args_p) ...@@ -1000,7 +1004,7 @@ l2l1_task (void *args_p)
start_meas (&ul_chan_stats); start_meas (&ul_chan_stats);
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
#warning figure out what to do with UE frame_parms during initial_sync //#warning figure out what to do with UE frame_parms during initial_sync
do_UL_sig (r_re0, r_im0, r_re, r_im, s_re, s_im, UE2eNB, do_UL_sig (r_re0, r_im0, r_re, r_im, s_re, s_im, UE2eNB,
enb_data, ue_data, next_slot, enb_data, ue_data, next_slot,
abstraction_flag, abstraction_flag,
...@@ -1034,7 +1038,7 @@ l2l1_task (void *args_p) ...@@ -1034,7 +1038,7 @@ l2l1_task (void *args_p)
for (UE_inst = 0; UE_inst < NB_UE_INST; UE_inst++) for (UE_inst = 0; UE_inst < NB_UE_INST; UE_inst++)
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
#warning check dimensions of r_reN,r_imN for multiple CCs //#warning check dimensions of r_reN,r_imN for multiple CCs
do_DL_sig (r_re0, do_DL_sig (r_re0,
r_im0, r_im0,
r_re, r_re,
...@@ -1061,7 +1065,7 @@ l2l1_task (void *args_p) ...@@ -1061,7 +1065,7 @@ l2l1_task (void *args_p)
start_meas (&ul_chan_stats); start_meas (&ul_chan_stats);
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
#warning check dimensions of r_reN,r_imN for multiple CCs //#warning check dimensions of r_reN,r_imN for multiple CCs
do_UL_sig (r_re0, do_UL_sig (r_re0,
r_im0, r_im0,
r_re, r_re,
...@@ -1770,6 +1774,7 @@ print_opp_meas (void) ...@@ -1770,6 +1774,7 @@ print_opp_meas (void)
} }
#if !defined(ENABLE_ITTI)
static void * static void *
sigh (void *arg) sigh (void *arg)
{ {
...@@ -1805,6 +1810,7 @@ sigh (void *arg) ...@@ -1805,6 +1810,7 @@ sigh (void *arg)
pthread_exit (NULL); pthread_exit (NULL);
} }
#endif /* !defined(ENABLE_ITTI) */
void void
oai_shutdown (void) oai_shutdown (void)
......
...@@ -957,7 +957,7 @@ void init_openair1(void) ...@@ -957,7 +957,7 @@ void init_openair1(void)
openair_daq_vars.rx_gain_mode = DAQ_AGC_ON; openair_daq_vars.rx_gain_mode = DAQ_AGC_ON;
openair_daq_vars.dlsch_transmission_mode = oai_emulation.info.transmission_mode[0]; openair_daq_vars.dlsch_transmission_mode = oai_emulation.info.transmission_mode[0];
#warning "NN->FK: OAI EMU channel abstraction does not work for MCS higher than" //#warning "NN->FK: OAI EMU channel abstraction does not work for MCS higher than"
openair_daq_vars.target_ue_dl_mcs = cmin(target_dl_mcs,16); openair_daq_vars.target_ue_dl_mcs = cmin(target_dl_mcs,16);
openair_daq_vars.target_ue_ul_mcs = target_ul_mcs; openair_daq_vars.target_ue_ul_mcs = target_ul_mcs;
openair_daq_vars.ue_dl_rb_alloc=0x1fff; openair_daq_vars.ue_dl_rb_alloc=0x1fff;
...@@ -1049,7 +1049,7 @@ void init_openair2(void) ...@@ -1049,7 +1049,7 @@ void init_openair2(void)
module_id_t enb_id; module_id_t enb_id;
module_id_t UE_id; module_id_t UE_id;
int CC_id; int CC_id;
#warning "eNB index is hard coded to zero" //#warning "eNB index is hard coded to zero"
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++)
l2_init (&PHY_vars_eNB_g[0][CC_id]->lte_frame_parms, l2_init (&PHY_vars_eNB_g[0][CC_id]->lte_frame_parms,
...@@ -1270,10 +1270,10 @@ void update_ocm() ...@@ -1270,10 +1270,10 @@ void update_ocm()
LOG_I(OCM,"Path loss (CCid %d) between eNB %d at (%f,%f) and UE %d at (%f,%f) is %f, angle %f\n", LOG_I(OCM,"Path loss (CCid %d) between eNB %d at (%f,%f) and UE %d at (%f,%f) is %f, angle %f\n",
CC_id,eNB_id,enb_data[eNB_id]->x,enb_data[eNB_id]->y,UE_id,ue_data[UE_id]->x,ue_data[UE_id]->y, CC_id,eNB_id,enb_data[eNB_id]->x,enb_data[eNB_id]->y,UE_id,ue_data[UE_id]->x,ue_data[UE_id]->y,
eNB2UE[eNB_id][UE_id][CC_id]->path_loss_dB, eNB2UE[eNB_id][UE_id][CC_id]->aoa); eNB2UE[eNB_id][UE_id][CC_id]->path_loss_dB, eNB2UE[eNB_id][UE_id][CC_id]->aoa);
double dx, dy, distance; //double dx, dy, distance;
dx = enb_data[eNB_id]->x - ue_data[UE_id]->x; //dx = enb_data[eNB_id]->x - ue_data[UE_id]->x;
dy = enb_data[eNB_id]->y - ue_data[UE_id]->y; //dy = enb_data[eNB_id]->y - ue_data[UE_id]->y;
distance = sqrt(dx * dx + dy * dy); //distance = sqrt(dx * dx + dy * dy);
/*LOG_D(LOCALIZE, " OCM distance between eNB %d at (%f,%f) and UE %d at (%f,%f) is %f \n", /*LOG_D(LOCALIZE, " OCM distance between eNB %d at (%f,%f) and UE %d at (%f,%f) is %f \n",
eNB_id, enb_data[eNB_id]->x,enb_data[eNB_id]->y, eNB_id, enb_data[eNB_id]->x,enb_data[eNB_id]->y,
UE_id, ue_data[UE_id]->x,ue_data[UE_id]->y, UE_id, ue_data[UE_id]->x,ue_data[UE_id]->y,
...@@ -1313,7 +1313,7 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime) ...@@ -1313,7 +1313,7 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
#if defined(USER_MODE) && defined(OAI_EMU) #if defined(USER_MODE) && defined(OAI_EMU)
int rrc_state=0; //int rrc_state=0;
if (oai_emulation.info.otg_enabled ==1 ) { if (oai_emulation.info.otg_enabled ==1 ) {
......
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