Commit cef118a2 authored by winckel's avatar winckel

Fixed some warnings.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4511 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 7e4aacab
...@@ -745,7 +745,7 @@ void update_omg () { ...@@ -745,7 +745,7 @@ void update_omg () {
if (oai_emulation.info.omg_model_enb >= MAX_NUM_MOB_TYPES) { // mix mobility model if (oai_emulation.info.omg_model_enb >= MAX_NUM_MOB_TYPES) { // mix mobility model
for (eNB_id = oai_emulation.info.first_enb_local; eNB_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local); eNB_id++) { for (eNB_id = oai_emulation.info.first_enb_local; eNB_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local); eNB_id++) {
new_omg_model = randomGen (STATIC, RWALK); new_omg_model = randomGen (STATIC, RWALK);
LOG_D (OMG,"[eNB] Node of ID %d is changing mobility generator ->%d \n", UE_id, new_omg_model); LOG_D (OMG,"[eNB] Node of ID %d is changing mobility generator ->%d \n", eNB_id, new_omg_model);
// reset the mobility model for a specific node // reset the mobility model for a specific node
set_new_mob_type (eNB_id, eNB, new_omg_model, oai_emulation.info.time_s); set_new_mob_type (eNB_id, eNB, new_omg_model, oai_emulation.info.time_s);
} }
......
...@@ -536,24 +536,26 @@ void get_beta_map() { ...@@ -536,24 +536,26 @@ void get_beta_map() {
} }
} }
// else { // else {
fgets(buffer, 1000, fp); if (fgets (buffer, 1000, fp) != NULL) {
fgets(buffer, 1000, fp); if (fgets (buffer, 1000, fp) != NULL) {
table_length[mcs]=0; table_length[mcs] = 0;
while (!feof(fp)) { while (!feof (fp)) {
u=0; u = 0;
sinr_bler = strtok(buffer, ";"); sinr_bler = strtok (buffer, ";");
while(sinr_bler != NULL){ while (sinr_bler != NULL) {
perf_array[u]=atof(sinr_bler); perf_array[u] = atof (sinr_bler);
u++; u++;
sinr_bler = strtok(NULL,";"); sinr_bler = strtok (NULL, ";");
} }
if((perf_array[4]/perf_array[5]) < 1){ if ((perf_array[4] / perf_array[5]) < 1) {
sinr_bler_map[mcs][0][table_length[mcs]] = perf_array[0]; sinr_bler_map[mcs][0][table_length[mcs]] = perf_array[0];
sinr_bler_map[mcs][1][table_length[mcs]] = (perf_array[4]/perf_array[5]); sinr_bler_map[mcs][1][table_length[mcs]] = (perf_array[4] / perf_array[5]);
table_length[mcs]++; table_length[mcs]++;
} }
fgets(buffer, 1000, fp); if (fgets (buffer, 1000, fp) != NULL) {
}
}
}
} }
fclose(fp); fclose(fp);
// } // }
...@@ -592,14 +594,15 @@ void get_MIESM_param() { ...@@ -592,14 +594,15 @@ void get_MIESM_param() {
while (!feof(fp)) { while (!feof(fp)) {
table_len =0; table_len =0;
cnt++; cnt++;
fgets(buffer, 10000, fp); if (fgets(buffer, 10000, fp) != NULL) {
result = strtok(buffer, ","); result = strtok (buffer, ",");
while (result != NULL) { while (result != NULL) {
MI_map_4qam[cnt][table_len]= atof(result); MI_map_4qam[cnt][table_len] = atof (result);
result = strtok(NULL, ","); result = strtok (NULL, ",");
table_len++; table_len++;
} }
} }
}
fclose(fp); fclose(fp);
for (t = 0; t < 162; t++){ for (t = 0; t < 162; t++){
// MI_map_4Qam[0][t] = pow(10,0.1*(MI_map_4Qam[0][t])); // MI_map_4Qam[0][t] = pow(10,0.1*(MI_map_4Qam[0][t]));
...@@ -611,14 +614,15 @@ void get_MIESM_param() { ...@@ -611,14 +614,15 @@ void get_MIESM_param() {
while (!feof(fp)) { while (!feof(fp)) {
table_len =0; table_len =0;
cnt++; cnt++;
fgets(buffer, 10000, fp); if (fgets (buffer, 10000, fp) != NULL) {
result = strtok(buffer, ","); result = strtok (buffer, ",");
while (result != NULL) { while (result != NULL) {
MI_map_16qam[cnt][table_len]= atof(result); MI_map_16qam[cnt][table_len] = atof (result);
result = strtok(NULL, ","); result = strtok (NULL, ",");
table_len++; table_len++;
} }
} }
}
fclose(fp); fclose(fp);
for (t = 0; t < 197; t++){ for (t = 0; t < 197; t++){
// MI_map_16Qam[0][t] = pow(10,0.1*(MI_map_16Qam[0][t])); // MI_map_16Qam[0][t] = pow(10,0.1*(MI_map_16Qam[0][t]));
...@@ -632,7 +636,7 @@ void get_MIESM_param() { ...@@ -632,7 +636,7 @@ void get_MIESM_param() {
cnt++; cnt++;
if(cnt==3) if(cnt==3)
break; break;
fgets(buffer, 10000, fp); if (fgets (buffer, 10000, fp) != NULL) {
result = strtok(buffer, ","); result = strtok(buffer, ",");
while (result != NULL) { while (result != NULL) {
MI_map_64qam[cnt][table_len]= atof(result); MI_map_64qam[cnt][table_len]= atof(result);
...@@ -640,6 +644,7 @@ void get_MIESM_param() { ...@@ -640,6 +644,7 @@ void get_MIESM_param() {
table_len++; table_len++;
} }
} }
}
fclose(fp); fclose(fp);
for (t = 0; t < 227; t++){ for (t = 0; t < 227; t++){
//MI_map_64Qam[0][t] = pow(10,0.1*(MI_map_64Qam[0][t])); //MI_map_64Qam[0][t] = pow(10,0.1*(MI_map_64Qam[0][t]));
......
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