Commit 9df4a491 authored by Cedric Roux's avatar Cedric Roux

fix warnings in openair1/PHY/MODULATION/compute_bf_weights.c

Several various fixes are included. Not sure what component of
the system uses this file.

There is one 'abort' added in case a fscanf fails. It may be a
bit too brutal.
parent d36e4e4c
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include "PHY/impl_defs_lte.h"
int f_read(char *calibF_fname, int nb_ant, int nb_freq, int32_t **tdd_calib_coeffs){
FILE *calibF_fd;
int i,j,l,calibF_e;
int i,j,calibF_e;
calibF_fd = fopen(calibF_fname,"r");
......@@ -14,7 +15,7 @@ int f_read(char *calibF_fname, int nb_ant, int nb_freq, int32_t **tdd_calib_coef
for(i=0;i<nb_ant;i++){
for(j=0;j<nb_freq*2;j++){
fscanf(calibF_fd, "%d", &calibF_e);
if (fscanf(calibF_fd, "%d", &calibF_e) != 1) abort();
tdd_calib_coeffs[i][j] = (int16_t)calibF_e;
}
}
......@@ -22,11 +23,15 @@ int f_read(char *calibF_fname, int nb_ant, int nb_freq, int32_t **tdd_calib_coef
printf("%d\n",(int)tdd_calib_coeffs[1][599]);
} else
printf("%s not found, running with defaults\n",calibF_fname);
/* TODO: what to return? is this code used at all? */
return 0;
}
int estimate_DLCSI_from_ULCSI(int32_t **calib_dl_ch_estimates, int32_t **ul_ch_estimates, int32_t **tdd_calib_coeffs, int nb_ant, int nb_freq) {
/* TODO: what to return? is this code used at all? */
return 0;
}
......@@ -44,6 +49,8 @@ int compute_BF_weights(int32_t **beam_weights, int32_t **calib_dl_ch_estimates,
default :
break;
}
/* TODO: what to return? is this code used at all? */
return 0;
}
// temporal test function
......
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