diff --git a/openair1/PHY/CODING/3gpplte_sse.c b/openair1/PHY/CODING/3gpplte_sse.c index 5390f59dbe3381424e54504cb4acd6ab5fafc271..129d3a86f8c3033de0d2784664876d265ede67ea 100755 --- a/openair1/PHY/CODING/3gpplte_sse.c +++ b/openair1/PHY/CODING/3gpplte_sse.c @@ -138,7 +138,7 @@ char interleave_compact_byte(short * base_interleaver,unsigned char * input, uns __m128i tmp; int input_length_words=n>>1; unsigned short * systematic2_ptr=(unsigned short *) output; - int j; +// int j; for ( i=0; i< input_length_words ; i ++ ) { // for (j=0;j<16;j++) printf("%d(%d).",ptr_intl[j],expandInput[ptr_intl[j]]); diff --git a/openair1/PHY/CODING/lte_rate_matching.c b/openair1/PHY/CODING/lte_rate_matching.c index feebd3d86ba4e3addf9effbf12fe1d23e28ccb71..5f3e988bce656a300c64d82de0f4b939fbe54226 100644 --- a/openair1/PHY/CODING/lte_rate_matching.c +++ b/openair1/PHY/CODING/lte_rate_matching.c @@ -413,9 +413,9 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC, uint32_t Nir,Ncb,Gp,GpmodC,E,Ncbmod,ind,k; // int cnt=0; - int code_block,round; uint8_t *e2; #ifdef RM_DEBUG_TX + int code_block,round; int cnt; int zeroed=0; int oned=0; @@ -626,7 +626,7 @@ int lte_rate_matching_turbo_rx(uint32_t RTC, uint32_t Nir,Ncb,Gp,GpmodC,E,Ncbmod,ind,k; int16_t *soft_input2; - s32 w_tmp; +// s32 w_tmp; #ifdef RM_DEBUG int nulled=0; #endif diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c index ae08b304627d65b5d6d5c453a6cf5eb664d11b50..61087c7ab9eb5b9da029f22d6a582543879d616d 100644 --- a/openair1/PHY/INIT/lte_init.c +++ b/openair1/PHY/INIT/lte_init.c @@ -443,9 +443,9 @@ void phy_config_afterHO_ue(u8 Mod_id,u8 eNB_id, MobilityControlInfo_t *mobilityC //PHY_vars_UE_g[UE_id]->UE_mode[0] = PRACH; LTE_DL_FRAME_PARMS *lte_frame_parms = &PHY_vars_UE_g[Mod_id]->lte_frame_parms; - int N_ZC; - u8 prach_fmt; - int u; +// int N_ZC; +// u8 prach_fmt; +// int u; LOG_I(PHY,"[UE%d] Frame %d: Handover triggered: Applying radioResourceConfigCommon from eNB %d\n", Mod_id,PHY_vars_UE_g[Mod_id]->frame,eNB_id); @@ -457,10 +457,10 @@ void phy_config_afterHO_ue(u8 Mod_id,u8 eNB_id, MobilityControlInfo_t *mobilityC lte_frame_parms->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->zeroCorrelationZoneConfig; lte_frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->prach_FreqOffset; - prach_fmt = get_prach_fmt(radioResourceConfigCommon->prach_Config.prach_ConfigInfo->prach_ConfigIndex,lte_frame_parms->frame_type); - N_ZC = (prach_fmt <4)?839:139; - u = (prach_fmt < 4) ? prach_root_sequence_map0_3[lte_frame_parms->prach_config_common.rootSequenceIndex] : - prach_root_sequence_map4[lte_frame_parms->prach_config_common.rootSequenceIndex]; +// prach_fmt = get_prach_fmt(radioResourceConfigCommon->prach_Config.prach_ConfigInfo->prach_ConfigIndex,lte_frame_parms->frame_type); +// N_ZC = (prach_fmt <4)?839:139; +// u = (prach_fmt < 4) ? prach_root_sequence_map0_3[lte_frame_parms->prach_config_common.rootSequenceIndex] : +// prach_root_sequence_map4[lte_frame_parms->prach_config_common.rootSequenceIndex]; //compute_prach_seq(u,N_ZC, PHY_vars_UE_g[Mod_id]->X_u); compute_prach_seq(&PHY_vars_UE_g[Mod_id]->lte_frame_parms.prach_config_common, diff --git a/openair1/PHY/LTE_ESTIMATION/adjust_gain.c b/openair1/PHY/LTE_ESTIMATION/adjust_gain.c index cd0a490ca8924dd174652c5001f470e045e23d26..9bbe0d4f5cfb03d36d26d306756f92cb81aa00d0 100644 --- a/openair1/PHY/LTE_ESTIMATION/adjust_gain.c +++ b/openair1/PHY/LTE_ESTIMATION/adjust_gain.c @@ -18,11 +18,14 @@ extern int card; void phy_adjust_gain (PHY_VARS_UE *phy_vars_ue, u8 eNB_id) { - u16 rx_power_fil_dB,i; + u16 rx_power_fil_dB; #ifdef EXMIMO #ifdef DRIVER2013 exmimo_config_t *p_exmimo_config = openair0_exmimo_pci[card].exmimo_config_ptr; #endif +#endif +#if defined(EXMIMO) || defined(CBMIMO1) + u16 i; #endif //rx_power_fil_dB = dB_fixed(phy_vars_ue->PHY_measurements.rssi); diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index 9b850f5ea1faaaf7ca737f49ba039d49be126e8f..ff88dae4f900a01d47187b7855c515bd4dadbe06 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -3208,6 +3208,8 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, msg("Format 0 DCI :ulsch (ue): Nsymb_pusch %d\n",ulsch->Nsymb_pusch); msg("Format 0 DCI :ulsch (ue): cshift %d\n",ulsch->harq_processes[harq_pid]->n_DMRS2); +#else + UNUSED_VARIABLE(dai); #endif return(0); } @@ -3570,6 +3572,8 @@ int generate_eNB_ulsch_params_from_dci(void *dci_pdu, msg("ulsch (eNB): Or1 %d\n",ulsch->Or1); msg("ulsch (eNB): Nsymb_pusch %d\n",ulsch->Nsymb_pusch); msg("ulsch (eNB): cshift %d\n",ulsch->harq_processes[harq_pid]->n_DMRS2); +#else + UNUSED_VARIABLE(dai); #endif return(0); } diff --git a/openair1/PHY/MODULATION/ul_7_5_kHz.c b/openair1/PHY/MODULATION/ul_7_5_kHz.c index 59c7479b3f0b5ce059dedd1f7bdb4ad5df1d2b90..0471a6ad56a0a7c669fc67f60d46d191ccc997ee 100755 --- a/openair1/PHY/MODULATION/ul_7_5_kHz.c +++ b/openair1/PHY/MODULATION/ul_7_5_kHz.c @@ -32,7 +32,7 @@ void apply_7_5_kHz(PHY_VARS_UE *phy_vars_ue,s32*txdata,u8 slot) { u32 *kHz7_5ptr; __m128i *txptr128,*kHz7_5ptr128,mmtmp_re,mmtmp_im,mmtmp_re2,mmtmp_im2; u32 slot_offset; - u8 aa; +// u8 aa; u32 i; LTE_DL_FRAME_PARMS *frame_parms=&phy_vars_ue->lte_frame_parms; diff --git a/openair1/PHY/TOOLS/cmult_vv.c b/openair1/PHY/TOOLS/cmult_vv.c index 0f0fbe46865686e1b2b10331ac62544f694c93ae..c4922067a547fc7dd6ffa3262f218c3136040bec 100755 --- a/openair1/PHY/TOOLS/cmult_vv.c +++ b/openair1/PHY/TOOLS/cmult_vv.c @@ -1020,7 +1020,7 @@ int mult_cpx_vector_norep_conj2(s16 *x1, - s16 *temps; +// s16 *temps; int *tempw; diff --git a/openair2/COMMON/platform_constants.h b/openair2/COMMON/platform_constants.h index 7266b48803c9a37e947672544935ecd13c62c323..f0dca1746b0dab371d8d68b19ea99afb2de523dd 100755 --- a/openair2/COMMON/platform_constants.h +++ b/openair2/COMMON/platform_constants.h @@ -139,4 +139,6 @@ #define printk printf #endif -#endif +#define UNUSED_VARIABLE(vARIABLE) (void)(vARIABLE) + +#endif /* __PLATFORM_CONSTANTS_H__ */ diff --git a/openair2/COMMON/platform_types.h b/openair2/COMMON/platform_types.h index 47fc9aa472fbc6fb16ab4ff28052b7f02f30ef89..3d0cfe17c1fcbcfe1d22a5393a2df09abed91ba1 100755 --- a/openair2/COMMON/platform_types.h +++ b/openair2/COMMON/platform_types.h @@ -9,9 +9,8 @@ #ifndef __PLATFORM_TYPES_H__ # define __PLATFORM_TYPES_H__ -#ifndef USER_MODE -#else -#include "openair_types.h" +#ifdef USER_MODE +# include "openair_types.h" #endif typedef unsigned char u8_t; diff --git a/openair2/LAYER2/MAC/ra_procedures.c b/openair2/LAYER2/MAC/ra_procedures.c index 4a7e69edcbeac186cefc9ab97ef669b63831a39a..433664a66037ff38005a3171b412335c1f1c8f01 100644 --- a/openair2/LAYER2/MAC/ra_procedures.c +++ b/openair2/LAYER2/MAC/ra_procedures.c @@ -229,11 +229,9 @@ PRACH_RESOURCES_t *ue_get_rach(u8 Mod_id,u32 frame, u8 eNB_index,u8 subframe){ s32 frame_diff=0; mac_rlc_status_resp_t rlc_status; u8 dcch_header_len=0; - u8 dcch_header_len_tmp=0; u16 sdu_lengths[8]; - u8 sdu_lcids[8],payload_offset=0,num_sdus=0; + u8 sdu_lcids[8]; u8 ulsch_buff[MAX_ULSCH_PAYLOAD_BYTES]; - u16 sdu_length_total=0; if (UE_mode == PRACH) { if (UE_mac_inst[Mod_id].radioResourceConfigCommon) @@ -313,11 +311,9 @@ PRACH_RESOURCES_t *ue_get_rach(u8 Mod_id,u32 frame, u8 eNB_index,u8 subframe){ DCCH, (char *)&ulsch_buff[0]); - sdu_length_total = sdu_lengths[0]; sdu_lcids[0] = DCCH; LOG_D(MAC,"[UE %d] TX Got %d bytes for DCCH\n",Mod_id,sdu_lengths[0]); - num_sdus = 1; update_bsr(Mod_id, frame, DCCH,UE_mac_inst[Mod_id].scheduling_info.LCGID[DCCH]); //header_len +=2; UE_mac_inst[Mod_id].RA_active = 1; diff --git a/openair2/RRC/NAS/nas_config.c b/openair2/RRC/NAS/nas_config.c index 2f6dad9b55bef38025d100b40b8b54db3a039d58..47b2aa338474b6384ef4e431a830e05d024596b1 100644 --- a/openair2/RRC/NAS/nas_config.c +++ b/openair2/RRC/NAS/nas_config.c @@ -113,7 +113,11 @@ int set_gateway(char *interfaceName, char *gateway) rt.rt_dev = interfaceName; //rt.rt_flags = RTF_UP|RTF_GATEWAY|RTF_DEFAULT; - rt.rt_flags = RTF_GATEWAY|RTF_DEFAULT; + /* SR: rt_flags on 16 bits but RTF_DEFAULT = 0x00010000 + * therefore doesn't lie in container -> disable it + */ + //rt.rt_flags = RTF_GATEWAY|RTF_DEFAULT; + rt.rt_flags = RTF_GATEWAY; if (ioctl(sock_fd, SIOCADDRT, &rt) < 0) { diff --git a/openair2/UTIL/FIFO/pad_list.c b/openair2/UTIL/FIFO/pad_list.c index 9d8750f87f0b90f46b49bf94fc682c0a4dce2508..21ad3ea757c192083fb444b7e9783d5245adcd7f 100755 --- a/openair2/UTIL/FIFO/pad_list.c +++ b/openair2/UTIL/FIFO/pad_list.c @@ -16,7 +16,6 @@ void job_list_init (Job_List * listP) { - int i = 0; listP->tail = NULL; listP->head = NULL; @@ -24,7 +23,6 @@ void job_list_init (Job_List * listP) { } void event_list_init (Event_List * listP) { - int i = 0; listP->tail = NULL; listP->head = NULL; @@ -32,7 +30,6 @@ void event_list_init (Event_List * listP) { } void pkt_list_init (Packet_OTG_List * listP) { - int i = 0; listP->tail = NULL; listP->head = NULL; diff --git a/openair2/UTIL/OMG/client_traci_OMG.c b/openair2/UTIL/OMG/client_traci_OMG.c index 13f4942892d0b8dc32dfd08f7f6cc34706c3cdff..63667b23e822207e3f44d90a09f0a1eaa1bd3674 100644 --- a/openair2/UTIL/OMG/client_traci_OMG.c +++ b/openair2/UTIL/OMG/client_traci_OMG.c @@ -47,6 +47,8 @@ #include "client_traci_OMG.h" #include "TraCIConstants.h" +#define UNUSED_VARIABLE(vARIABLE) (void)(vARIABLE) + int handshake(char *hoststr,int portno){ check_endianness(); // check endianness @@ -140,13 +142,17 @@ void processSubscriptions() { } char *objID = readString(); int varNo = readUnsignedByte(); - + + UNUSED_VARIABLE(objID); + UNUSED_VARIABLE(respStart); + int i; for (i=0; i<varNo; ++i) { int varID = readUnsignedByte(); bool ok = readUnsignedByte()==RTYPE_OK; int valueDataType = readUnsignedByte(); + UNUSED_VARIABLE(valueDataType); if (ok&&cmdId==CMD_SUBSCRIBE_SIM_VARIABLE+0x10&&varID==VAR_DEPARTED_VEHICLES_IDS) { tmp_departed = readStringList(tmp_departed); //printf(" OMG Got departed cars\n"); @@ -176,7 +182,7 @@ int extractCommandStatus(storage *s, unsigned char commandId, char * description // tracker currently points to the begining of the recieved data in the linked list tracker = s; - storage *freeTracker = tracker; // save it for calling free +// storage *freeTracker = tracker; // save it for calling free int commandLength = readUnsignedByte(); @@ -210,8 +216,11 @@ int extractCommandStatus(storage *s, unsigned char commandId, char * description //free actual message content //depends on the message which is handled - /* if (commandId != CMD_GET_VEHICLE_VARIABLE) - freeStorage(freeTracker);*/ + /* if (commandId != CMD_GET_VEHICLE_VARIABLE) + freeStorage(freeTracker);*/ + + UNUSED_VARIABLE(commandLength); + UNUSED_VARIABLE(storageLength_); return success; } @@ -312,6 +321,10 @@ void commandGetVehicleVariable(char *vehID, int varID)// malloc for vehID and va char* rs = readString(); int valueDataType = readUnsignedByte(); + UNUSED_VARIABLE(VariableID); + UNUSED_VARIABLE(rs); + UNUSED_VARIABLE(valueDataType); + UNUSED_VARIABLE(domID); } } @@ -375,6 +388,12 @@ int commandGetMaxSUMONodesVariable() else { //LOG_W(OMG, " No Matching Data Type Value \n"); } + UNUSED_VARIABLE(res); + UNUSED_VARIABLE(Length); + UNUSED_VARIABLE(flag); + UNUSED_VARIABLE(dom); + UNUSED_VARIABLE(domID); + UNUSED_VARIABLE(VariableID); } return max_car; diff --git a/openair2/UTIL/OMG/job.c b/openair2/UTIL/OMG/job.c index ff055dcc75e092ef84e3b04bcd2a0f00c875d51c..b1143ba363031c81fde6d272a557c49b83b92528 100644 --- a/openair2/UTIL/OMG/job.c +++ b/openair2/UTIL/OMG/job.c @@ -121,13 +121,11 @@ Job_list quick_sort (Job_list list) Job_list remove_job(Job_list list, int nID, int node_type){ - - int found; + Job_list current, previous; //int cond=0; int i=0; - if (list == NULL){ - found = 1; //false + if (list == NULL){ return NULL; } else{ //start search @@ -153,12 +151,10 @@ Job_list remove_job(Job_list list, int nID, int node_type){ //if (current->pair->b->type == node_type){LOG_D(OMG, "current->pair->b->type == node_type");} if (current ==NULL) { - found= 1 ; LOG_D(OMG," Job to remove is not found\n "); //LOG_N return NULL; } //value not found else{ - found = 0; // true value found if (current == list) { list = current->next ; LOG_D(OMG,"Job to remove is found at the beginning\n"); diff --git a/openair2/UTIL/OTG/otg_rx.c b/openair2/UTIL/OTG/otg_rx.c index 8a44a796f028cdf46adba544d564658d0287e3a1..c3ede43a4bdc47b0e9cc3898ad2ca39c399cbd1f 100644 --- a/openair2/UTIL/OTG/otg_rx.c +++ b/openair2/UTIL/OTG/otg_rx.c @@ -69,8 +69,6 @@ int otg_rx_pkt( int src, int dst, int ctime, char *buffer_tx, unsigned int size) unsigned int seq_num_rx; unsigned int nb_loss_pkts; unsigned int lost_packet=0; - unsigned int i; - char * hdr_payload=NULL; //int header_size; if (buffer_tx!=NULL) { diff --git a/targets/SIMU/USER/channel_sim.c b/targets/SIMU/USER/channel_sim.c index 1323a67929d27a0320e3264ab3cbca53dae0606a..bfc889e404acd3fdda03f773ca51633bdd86b23e 100644 --- a/targets/SIMU/USER/channel_sim.c +++ b/targets/SIMU/USER/channel_sim.c @@ -388,8 +388,12 @@ void do_DL_sig(double **r_re0,double **r_im0, 12); rx_pwr2 = signal_energy(rxdata[0]+slot_offset,512); -#ifdef DEBUG_SIM +#ifdef DEBUG_SIM LOG_D(OCM,"[SIM][DL] UE %d : rx_pwr (ADC out) %f dB (%d) for slot %d (subframe %d), writing to %p\n",UE_id, 10*log10((double)rx_pwr2),rx_pwr2,next_slot,next_slot>>1,rxdata); +#else + UNUSED_VARIABLE(rx_pwr2); + UNUSED_VARIABLE(tx_pwr); + UNUSED_VARIABLE(rx_pwr); #endif //}// UE_index loop } @@ -400,8 +404,9 @@ void do_DL_sig(double **r_re0,double **r_im0, void do_UL_sig(double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],u16 next_slot,u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms, u32 frame) { s32 **txdata,**rxdata; - +#ifdef PHY_ABSTRACTION_UL s32 att_eNB_id=-1; +#endif u8 eNB_id=0,UE_id=0; u8 nb_antennas_rx = UE2eNB[0][0]->nb_rx; // number of rx antennas at eNB @@ -411,18 +416,18 @@ void do_UL_sig(double **r_re0,double **r_im0,double **r_re,double **r_im,double s32 rx_pwr2; u32 i,aa; u32 slot_offset,slot_offset_meas; - - double min_path_loss=-200; - u16 ul_nb_rb=0 ; - u16 ul_fr_rb=0; - int ulnbrb2 ; - int ulfrrb2 ; - u8 harq_pid; + u8 hold_channel=0; + +#ifdef PHY_ABSTRACTION_UL + double min_path_loss=-200; + int subframe = (next_slot>>1); - - // u8 aatx,aarx; + u8 harq_pid; + u16 ul_nb_rb=0; + u16 ul_fr_rb=0; +#endif if (next_slot==4) { @@ -624,8 +629,13 @@ void do_UL_sig(double **r_re0,double **r_im0,double **r_re,double **r_im,double rx_pwr2 = signal_energy(rxdata[0]+slot_offset,frame_parms->samples_per_tti>>1); #ifdef DEBUG_SIM - printf("[SIM][UL] eNB %d rx_pwr (ADC out) %f dB (%d) for slot %d (subframe %d)\n",eNB_id,10*log10((double)rx_pwr2),rx_pwr2,next_slot,next_slot>>1); -#endif + printf("[SIM][UL] eNB %d rx_pwr (ADC out) %f dB (%d) for slot %d (subframe %d)\n", + eNB_id,10*log10((double)rx_pwr2),rx_pwr2,next_slot,next_slot>>1); +#else + UNUSED_VARIABLE(tx_pwr); + UNUSED_VARIABLE(rx_pwr); + UNUSED_VARIABLE(rx_pwr2); +#endif } // eNB_id } // abstraction_flag==0 diff --git a/targets/SIMU/USER/sinr_sim.c b/targets/SIMU/USER/sinr_sim.c index 719112709a850a783755f2a62fd67d4ec0af646a..f2c87d7dde219069cb12725227638536a348a46b 100644 --- a/targets/SIMU/USER/sinr_sim.c +++ b/targets/SIMU/USER/sinr_sim.c @@ -205,7 +205,6 @@ void calc_path_loss(node_desc_t* enb_data, node_desc_t* ue_data, channel_desc_t void init_snr(channel_desc_t* eNB2UE, node_desc_t *enb_data, node_desc_t *ue_data, double* sinr_dB, double* N0, u8 transmission_mode, u16 q, u8 dl_power_off) { - int return_value; u16 nb_rb = 25; //No. of resource blocks double thermal_noise,abs_channel,channelx, channely,channelx_i, channely_i ; int count;