Commit a58a5bc8 authored by Cedric Roux's avatar Cedric Roux

- Fix some more compiler warnings

Pre-ci tests passed


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4389 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 2c899296
......@@ -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]]);
......
......@@ -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
......
......@@ -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,
......
......@@ -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);
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -1020,7 +1020,7 @@ int mult_cpx_vector_norep_conj2(s16 *x1,
s16 *temps;
// s16 *temps;
int *tempw;
......
......@@ -139,4 +139,6 @@
#define printk printf
#endif
#endif
#define UNUSED_VARIABLE(vARIABLE) (void)(vARIABLE)
#endif /* __PLATFORM_CONSTANTS_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;
......
......@@ -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;
......
......@@ -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)
{
......
......@@ -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;
......
......@@ -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;
......
......@@ -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");
......
......@@ -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) {
......
......@@ -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
......
......@@ -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;
......
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